Error: _arcgis_core_geometry__WEBPACK_IMPORTED_MODULE_13__.load is not a function"

481
2
Jump to solution
04-29-2022 04:42 AM
MaryamShahid
New Contributor

Hi I am new to arcgis and having trouble with the following - I have imported the projection module as:

import * as projection from '@arcgis/core/geometry'

and I am using it in the following way:

projection.load().then(() => {
point = projection.project(point, new SpatialReference({ wkid: 4326 }))
method()
})

 However, I am getting the following error in which the load function isn't being found: 

_arcgis_core_geometry__WEBPACK_IMPORTED_MODULE_13__.load is not a function"

Does anyone know how I can solve this? Thanks.

0 Kudos
1 Solution

Accepted Solutions
ReneRubalcava
Frequent Contributor

Update your import syntax to import from the projection module.

import * as projection from "@arcgis/core/geometry/projection";

Per here: https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html

That should fix you all up! 

View solution in original post

0 Kudos
2 Replies
ReneRubalcava
Frequent Contributor

Update your import syntax to import from the projection module.

import * as projection from "@arcgis/core/geometry/projection";

Per here: https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html

That should fix you all up! 

0 Kudos
MaryamShahid
New Contributor

**bleep**, good catch. Thanks!

 

0 Kudos