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.


Your coordinates are incorrect.

Correct answer is

view.center = [-77.05070999, 38.90309];


| improve this answer | |

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]

| improve this answer | |
  • 1
    Holy cannoli! :) That's the best thing I've heard all day. You're right! Can't tell I'm new at this, huh? – Amy Lashley Jun 12 '18 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.