2

Is it possible that I limit MKMapView to a certain area but I can still zoom in and out on that area?

func mapView(mapView: MKMapView, regionDidChangeAnimated animated: Bool) {

        var span = MKCoordinateSpanMake(0.055, 0.055)
        var region = MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: 7.466988, longitude: 134.562119), span: span)
        mapView.setRegion(region, animated: true)

    }
LC 웃
  • 18,888
  • 9
  • 57
  • 72
Mark Maraya
  • 225
  • 2
  • 9
  • 1
    what do you mean limit? you are setting the region and that will work for you – LC 웃 Jun 16 '15 at 13:50
  • 1
    Limit the MKMapView to that area or city. i.e. I can only view USA and if I try to drag/slide the map to Canada I won't be able to. – Mark Maraya Jun 17 '15 at 06:58
  • Hope you can find you answer here: [iOS - How to limit the MapView to a specific region?](http://stackoverflow.com/questions/5680896/ios-how-to-limit-the-mapview-to-a-specific-region). Good luck! – HongchaoZhang May 11 '17 at 02:08

0 Answers0