Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Keeping the current zoom level forms.maps

$
0
0

I'm using Forms.maps top show the users locations while tracking on a map, everything's working fine except that I would like to keep the user's current "zoom level" when I'm in the handler.

The handler's code is :

void HandlePositionChanged(object obj, Geolocator.Plugin.Abstractions.PositionEventArgs e) {
    map.MoveToRegion(MapSpan.FromCenterAndRadius(new Xamarin.Forms.Maps.Position(e.Position.Latitude,e.Position.Longitude), Distance.FromMiles(4.0)));
}

Here the radius is set to 4 miles, I would like to have it as being the current level the user pinched it!

Looked up top find what I can in the map object to no avail.

Any idea ?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>