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 US ✭✭
    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.