changing map spatial reference

2503
2
02-14-2013 01:19 AM
RobertKoprowski
New Contributor
Hi all, I have a map service defined with Spatial Reference, say SR1, and a second map service defined with Spatial Reference, say SR2. Is it possible to change my MapWidget options so SR1 would be replaced with SR2 so I could load my second map service to my widget and display it?
Thank you for your replies
Regards
R
0 Kudos
2 Replies
derekswingley1
Frequent Contributor
The map's spatial reference is defined by the first layer added to the map (or, if you pass an extent to esri.Map, the spatial reference of the extent is used for the map). Once a map's spatial reference is set you cannot change it.

You can however destroy and create a new map. The feature layer in any projection sample shows this.

The answer to your question is no�?? destroy and create a new map to accomodate the service in a different spatial reference. Or, if you're using a dynamic map service (or feature service), let the map request data from the service to match the spatial reference of the map as dynamic and feature services can be reprojected on the fly.
DavidFrith
New Contributor
Hello,

I'm in a similar situation,  I just started with my current employer and all the previous staff quit.  One thing that has come up as a potential problem is that the GIS Viewer is setup in a different coordinate system than all the data the company uses and now they we are in the process of building an extract tool.  So now if they use the extract tool, or coordinates tool for that matter, the projection of the data and the coordinates will be different than they are expecting and create issues with contractors and crews looking for infrastructure.  Is the only way to correct this to create a whole new map?

Thanks,
David
0 Kudos