TorbenK / TK.CustomMap

Extended Map Control
MIT License
142 stars 109 forks source link

Strange issue with MoveToRegion #227

Closed Thijmen closed 7 years ago

Thijmen commented 7 years ago

Dear,

I am having a somewhat strange issue with MoveToRegion. When I have a clean project with this code:

var newYork = new Position(40.7142700, -74.0059700);
var mapView = new TKCustomMap(MapSpan.FromCenterAndRadius(newYork, Distance.FromKilometers(2)));

mapView.MoveToRegion(MapSpan.FromCenterAndRadius(new Xamarin.Forms.Maps.Position(52.219147, 6.893663), Distance.FromMiles(3)).WithZoom(9));

With the code above, my map still stays in New York. With this code, it goes to Enschede (the point I used in MoveToRegion)

var newYork = new Position(40.7142700, -74.0059700);
var mapView = new Xamarin.Forms.Maps.Map(MapSpan.FromCenterAndRadius(newYork, Distance.FromKilometers(2)));

mapView.MoveToRegion(MapSpan.FromCenterAndRadius(new Xamarin.Forms.Maps.Position(52.219147, 6.893663), Distance.FromMiles(3)).WithZoom(9));

Any idea why MoveToRegion isnt working? Xamarin.Forms: v2.3.4.247 TK.CustomMap: v1.5.0 Xamarin.Forms.Maps: v3.3.193

Thijmen commented 7 years ago

By the way; i'm doing this.Content = mapView;

TorbenK commented 7 years ago

228