Forum Xamarin.iOS
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How to zoom out the map by default?

AdrianGhiAdrianGhi USMember ✭✭

Hi, I have a question.

I want to create a MKMapView and when I open the app, the map to be zoomed out to the maximum level. Now, when I'm opening the app is zoomed in by default on my country and I don't like it.

Is possible what I want?

Tagged:

Best Answer

  • AdrianGhiAdrianGhi USMember ✭✭
    edited June 2018 Accepted Answer
    var locationCoordinate = new CLLocationCoordinate2D(latitude, longitude);
    var coordinateSpan = new MKCoordinateSpan(100, 100); //this seems to be the maximum zoom out
    var coordinateRegion = new MKCoordinateRegion(locationCoordinate, coordinateSpan);
    mapView.SetRegion(coordinateRegion, false);
    

Answers

  • AdrianGhiAdrianGhi USMember ✭✭
    edited June 2018 Accepted Answer
    var locationCoordinate = new CLLocationCoordinate2D(latitude, longitude);
    var coordinateSpan = new MKCoordinateSpan(100, 100); //this seems to be the maximum zoom out
    var coordinateRegion = new MKCoordinateRegion(locationCoordinate, coordinateSpan);
    mapView.SetRegion(coordinateRegion, false);
    
Sign In or Register to comment.