Dear all,
I am currently working on the closest facilities sample in ArcGIS API for JavaScript.
In the sample code they are adding a number of points to the map by using:
map.addLayer(facilitiesGraphicsLayer);
facilitiesGraphicsLayer.add(new Graphic(new Point(-13625960,4549921,map.spatialReference)));
I created a groupe of point in ArcMap and have their (x,y) coordinate using WGS 1984 Coordinate System and Decimal Degrees us units.
When i replace the values i could not find my points on the map!!
I think the problem is coming from my coordinate system and units i use??
If someone could provide me with some support i would be very gratefull.
Solved! Go to Solution.
The simplest solution would be to change the projection of your ArcMap document and calculate the XY coordinates. Go to your map document Data Frame Properties and select the Coordinate System tab. Search for 'web mercator' or browse to: Projected Coordinate Systems > World > WGS1984 Web Mercator.
Then you can use the Add XY tool to get the projected coordinates.
Alternatively, if you want to be able to do this for any point dynamically in the ESRI JS API use a Geometry Service to project your coordinates.
The simplest solution would be to change the projection of your ArcMap document and calculate the XY coordinates. Go to your map document Data Frame Properties and select the Coordinate System tab. Search for 'web mercator' or browse to: Projected Coordinate Systems > World > WGS1984 Web Mercator.
Then you can use the Add XY tool to get the projected coordinates.
Alternatively, if you want to be able to do this for any point dynamically in the ESRI JS API use a Geometry Service to project your coordinates.