Application throwing exception when panning around at maximum extent

460
2
11-10-2010 02:42 PM
joshuvaThalari
New Contributor
Hi,

When i zoom in to the map in our application to the maximum extent and then try to pan around its throwing an exception as below...

An unhandled exception ( 'Unhandled exception in silverlight2 application Invalid spatial reference. Spatial reference must match map's spatial reference at ESRI.ArcGIS.Client.Map.checkSpatialReference( Geometry value ) at ESRI.ArcGIS.Client.Map.panTo(Geometry geometry, Boolean skipAnimation )

Can anyone please explain me what is this exception and how to solve it ??

thanks,
Josh
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
Do you call any of the PanTo() or ZoomTo() methods in your code? If so, if the geometry that you pass is either null or its SpatialReference does not match the map's SpatialReference, this exception is expected to be thrown.

Can you tell us what version of the API you are using? Can you also share some code and steps so we may replicate the issue on our end?

Thanks.
0 Kudos
joshuvaThalari
New Contributor
Hi Thanks for the reply...The issue was sorted by creating a geometry service on the ArcGIS Server.

But still the question remains to me... When i run the application from another system other than server, it throws the exception but when the deploy the application to the IIS server on the ArcGIS server machine, it works fine without any problem.

my question is , if the ArcGIS server and IIS server are on different machines as is the case when i am running application from my local machine, then how do we make the application run without throwing that exception...
0 Kudos