MKMapRect zooms too much

后端 未结 5 1839
悲哀的现实
悲哀的现实 2021-01-14 11:32

I use this code to show all my annotations on my map:

 MKMapRect zoomRect = MKMapRectNull;
        for (id  annotation in mapView.annotat         


        
5条回答
  •  情书的邮戳
    2021-01-14 12:00

    In my code, I add extra spacing around, so it will automatically adjust the zoom level in order to fit.

    [aMapView setVisibleMapRect:zoomRect edgePadding:UIEdgeInsetsMake(-100, -50, -50, -50) animated:YES];
    

提交回复
热议问题