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 2
Your coordinates are incorrect.
Correct answer is
view.center = [-77.05070999, 38.90309];
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]
-
1Holy 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– Amy Lashley2018年06月12日 15:52:48 +00:00Commented Jun 12, 2018 at 15:52