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.
Solved! Go to Solution.
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!
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!
**bleep**, good catch. Thanks!