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

Xamarin.Forms.Maps zoom level ignored in iOS

$
0
0

Hi everyone,

For my first project I have a simple XAML page showing a Xamarin.Forms.Map.
In my page I'm using this code to initialize:

const int zoomLevel = 7; // between 1 and 18
var latlongdegrees = 360 / (Math.Pow(2, zoomLevel));

var meppelPin = new Pin
{
        Position = new Position(52.70532069999999, 6.187675799999965),
        Address = "Paradijsweg 2, 7942 HB Meppel",
        Label = "Locatie Meppel",
        Type = PinType.Place
};

MainMap.Pins.Add(meppelPin);

MainMap.MoveToRegion(new MapSpan(new Position(52.50, 5.45), latlongdegrees, latlongdegrees));

This should focus on the center of Holland at a certain zoom level.
This seems to work fine on Windows Phone, when I change zoomLevel the view will show accordingly. However on the iOS version the zoom level doesn't seem to have any effect at all.
I haven't been able to check it on Android just yet.

Am I doing something wrong?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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