0

What is a good enough method of knowing when to go out to the server and request for annotations? i.e. knowing when the area on the screen was not yet exposed by the user?

If I have a LAT1,LON1 LAT2,LON2 specifying the screen boundaries, or maybe the screen's center as LAT,LON, how can I know that the surface the user has moved to has never been exposed or even just a part of it?

Weird, but I can't find ideas online, Any methods would be welcome!

Thanks!

Ted
  • 3,805
  • 14
  • 56
  • 98

1 Answers1

1

store a set of MKMapRect objects that the map showed in a NSMutableSet maybe -- you then have all the areas that were visible previously. (combine rects when it makes sense to keep the set reasonable)

when you get a new MKMapRect (after a scroll or zoom of the map view -- the delegate is informed here) see if the new visibleMapRect lies within an old one or just intersects or is not inside the rect at all

an MKMapRect can be treated almost like a CGRect :)

Daij-Djan
  • 49,552
  • 17
  • 113
  • 135