AnsweredAssumed Answered

NullReferenceException when I try to ZoomTo

Question asked by xtian79 on Mar 13, 2014
Latest reply on Mar 18, 2014 by xtian79
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far???

I have created an ArcGISLocalFeatureLayer with a different spatial reference from the base layer, then I create a polyline that is added to the Graphics container of the layer.

As my data is in another spatial reference, I remove the layers from the map, change the spatial reference of the map and add the layers again.

then i try to perform ZoomTo using the geometry of the polyline and get this:

System.NullReferenceException was unhandled   HResult=-2147467261   Message=Object reference not set to an instance of an object.   Source=ESRI.ArcGIS.Client   StackTrace:        at ESRI.ArcGIS.Client.Map.getFullViewExtent()        at ESRI.ArcGIS.Client.Map.zoomTo(Geometry geom, Boolean skipAnimation)        at ESRI.ArcGIS.Client.Map.ZoomTo(Geometry geom)   InnerException: 


Any Idea???

if i try to make the zoom with mouse whell it works perfectly

Outcomes