XY Points incorrect on map (ArcGIS Javascript API 4.7)

Amy Lashley 06/12/2018. 2 answers, 113 views

Hopefully something silly I'm overlooking. I started building my map with this sample code

But once I started using my own data, it isn't appearing correctly on the map. Example: These coordinates [38.90309, -77.05070999] in Washington DC show up somewhere in Antartica, as do the other US coordinates.

I've read a little about specifying the coordinate system that is being used, and it seems that maybe that is the problem. But I can't find any documentation about how to do that in the JavaScript API.

2 Answers

Manish Patel 06/12/2018.

Your coordinates are incorrect.

Correct answer is

view.center = [-77.05070999, 38.90309];


James Lawruk 06/12/2018.

You probably just have the values reversed. When dealing with a point, ESRI expects the longitude(x) to be first, and latitude(y) to be second. [-77.0363403, 38.8894801]

Related questions

Hot questions


Popular Tags