Select to view content in your preferred language

Projection Problems?

819
6
12-12-2011 12:05 PM
JessicaKnight1
Occasional Contributor
I am fairly familiar with using ArcServer and the online mapping that comes with it, but I'm now beginning to experiment with the JavaScript API. I do have an online mapping service through ArcServer that works fairly well. Everything lines up as expected using my data and the Bing basemap using Arial and labels. However, when I load the map service into the JavaScript API using a basemap, my map for North Carolina shows up in Africa. I know it has to be a projection issue but not sure where to begin, especially since it all seems to work in ArcServer. I changed the data frame projection to WGS84 and it didn't do anything. Do I need to re-project each of my layers? Any ideas would be great! Thanks.

Jessica
0 Kudos
6 Replies
StephenLead
Honored Contributor
when I load the map service into the JavaScript API using a basemap, my map for North Carolina shows up in Africa.


Hi Jessica,

If you're using Bing Maps as the basemap, it might help to project all of your data into WGS 1984 Web Mercator, which is found under > Projected Coordinate Systems > World.

Try doing this with a separate copy of one layer, and physically changing the projection (eg, add it to a data frame, change the projection to WGS 1984 Web Mercator, export to a new shapefile, and choose to use the coordinate system of the data frame). Does this new layer appear in the correct position over the Bing basemap?

Steve
0 Kudos
JeffPace
MVP Alum
I would highly recommend Web Mercator Aux Sphere (102100). 

It is compatible with Bing, ArcGIS Online, Google, etc.. and seems to be the universal solution.
0 Kudos
JessicaKnight1
Occasional Contributor
Re-projecting into WGS84 Web Mercator seems to have worked. Thanks! I figured I would have to re-project my layers but wanted to make sure before I went through all the work.
0 Kudos
JeffPace
MVP Alum
Re-projecting into WGS84 Web Mercator seems to have worked. Thanks! I figured I would have to re-project my layers but wanted to make sure before I went through all the work.


You dont have to reproject anything!!!!! Just change your data frame properties.  The data can stay in its native projection.
0 Kudos
StephenLead
Honored Contributor
You dont have to reproject anything!!!!! Just change your data frame properties.  The data can stay in its native projection.


That's true, there's no need to change the dataset's projection (I just figured that for debugging purposes this would be the simplest approach).

However, you may see a slight performance advantage if all of your datasets are already in the same coordinate system as the basemap, since there's no need for any on-the-fly reprojection.

Good luck,
Steve
0 Kudos
JessicaKnight1
Occasional Contributor
I had already tried changing the data frame properties before posting and it didn't do anything. Not sure why, but reprojecting worked.
0 Kudos