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

Determining Zoom Level in a Map

$
0
0

We are working with a Map control using Xamarin forms and found this http://forums.xamarin.com/discussion/18901/set-map-zoom-level to zoom the map in. To zoom the map we can use the following

var zoomLevel = 5; // pick a value between 1 and 18
var latlongdeg = 360 / (Math.Pow(2, zoomLevel));
map.MoveToRegion(new MapSpan (map.VisibleRegion.Center, latlongdeg, latlongdeg));

But how can we determine the zoomLevel, basically going the opposite way. So I know the latlongdeg and want to get zoomLevel.

Any ideas?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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