I have troubles importing the projectOperator in my custom ExB Widget. This is my code:
import * as projectOperator from 'esri/geometry/operators/projectOperator' const Widget = (props: AllWidgetProps<IMConfig>) => {
const projectCoords = async () => {
await projectOperator.load()
const pt = projectOperator.execute(jimuMapView.view.center, { wkid: 2056 })
}
}
When I use the Widget with the dev server, everything works fine.
I want to deploy the Widget in ArcGIS enterprise. The hosting is on IIS. When trying to use the widget in an experience, I get a 404 Not Found error. The widget tries to load projectOperator from here:
Does anybody know, what I need to do?
Importing other Maps SDK classes like "Point" works.
import Point from 'esri/geometry/Point'
In my manifest.json, I have jimu-arcgis as a dependency.
Thanks for any help!
Solved! Go to Solution.
What version of Enterprise are you on?
I think your issue relates to the compatibility between your Enterprise and the version of the JavaScript SDK it is compatible with.
ProjectOperator is a new feature in the API only added in 4.32. Enterprise will load the version of the JavaScript SDK it is compatible with. Unless you are on Enterprise 11.5, you will not be able to use projectOperator. And if you are, the chart is unclear.
https://developers.arcgis.com/experience-builder/guide/release-versions/
What version of Enterprise are you on?
I think your issue relates to the compatibility between your Enterprise and the version of the JavaScript SDK it is compatible with.
ProjectOperator is a new feature in the API only added in 4.32. Enterprise will load the version of the JavaScript SDK it is compatible with. Unless you are on Enterprise 11.5, you will not be able to use projectOperator. And if you are, the chart is unclear.
https://developers.arcgis.com/experience-builder/guide/release-versions/
Thank you for your answer. I have tested with Enterprise 11.5 and the import of projectOperator works!