MapaBase.ZoomDuration = new TimeSpan(0, 0, 3); //I declare the zoom duration to get the effect MapaBase.ZoomTo(coberturaDeEstados.Expand(1.1)); //the principal Envelope stored. MapaBase.ZoomTo(coberturaDeClientesZoom.Expand(1.2)); //the Feature envelope.
Solved! Go to Solution.
ZoomTo is an asynchronous method whose duration is managed by the ZoomDuration property.
If you call twice ZoomTo at the same time, the 2 methods won't be executed sequentially which is likely what you would expect.
The way to do it is to subscribe to Map.ExtentChanged event, call ZoomTo, and call again 'ZoomTo' in the extent changed event Handler.