
Untitled
By: a guest on
Apr 19th, 2012 | syntax:
None | size: 0.57 KB | hits: 7 | expires: Never
Find nearby locations in a given region
MKCoordinateRegion *mapRegion = myMap.region;
maxLatitude = mapRegion.center.latitude + mapRegion.span.latitudeDelta/2;
minLatitude = mapRegion.center.latitude - mapRegion.span.latitudeDelta/2;
maxLongitude = mapRegion.center.longitude+ mapRegion.span.longitudeDelta/2;
minLongitude = mapRegion.center.longitude- mapRegion.span.longitudeDelta/2;
find all locations where latitude > mapMinLat
and latitude < mapMaxLat
and longitude > mapMinLon
and longitude < mapMaxLon