AnsweredAssumed Answered

SetView/SetViewAsync not respecting MaximumExtent

Question asked by mangoyoga on Nov 29, 2017
Latest reply on Dec 14, 2017 by mangoyoga

In 10.2.7, I'm having a problem when setting the view to a point outside the maximum extent of the map. My map covers {Envelope[XMin=-2500000, YMin=3500000.00000629, XMax=3045983.99999371, YMax=9045984, Wkid=25833]}. SetViewAsync where I set center to TargetGeometry = {MapPoint[X=63, Y=10, Wkid=4326]} (which is outside the maximum extent of the map), my map goes to a blank area. I can still zoom and pan, but I am never able to SetView to a point within my map later or zoom/pan to a location within the map without restarting the application. 

 

I have tried calculating the MaximumExtent for the map on LayerLoaded event, but this only restrict where the user can zoom or pan, but does not affect the SetView methods. WrapAround is False.

 

Is there a better way to prevent this issue than checking against Maximum extent in all locations where I do a SetView call?

 

Adding a world map layer to my map, this issue no longer occurs, but we can't rely on the user having a world map available as a workaround for this issue.

Outcomes