0

Initially I load 10 pins using AFNetworking and plot them on the map and set the map zoom level to fit these 10 pins, however in my database I have 1000 pins and I want to load them as the user scrolls or zooms, how would I go about doing this?

Sami
  • 1,374
  • 1
  • 16
  • 43

1 Answers1

2

I develop similar app. In my case, I load new pins in regionDidChangeAnimated method.

func mapView(mapView: MKMapView!, regionDidChangeAnimated animated: Bool) {
    // load new pins 
}

As you know, this method is called by the user scrolls or zooms.

Kosuke Ogawa
  • 7,383
  • 3
  • 31
  • 52