Vote count:
0
i need some help towards the filter, how do i implement an algorithm that filters out related map annotations within the radius of user's location, thanks a lot guys! Any feedback is much appreciated! Thank you and have a nice day.
My code i think i have so far:
CLLocationCoordinate2D coordinates;
CLLocationDistance test = 1000; // set distance
coordinates.latitude = [[row objectForKey:@"latitude"] doubleValue];// get user's latitude
coordinates.longitude = [[row objectForKey:@"longitude"] doubleValue];
MapAnnotation *annotation = [[MapAnnotation alloc] initWithCoordinate:coordinates title:titles subtitle:contents image:[row objectForKey:@"image"]]; // specify annotation's detail
[self.mapView addAnnotation:annotation];// adding annotation into the map
[annotation release];
asked 16 secs ago
filter map annotations by distance
Aucun commentaire:
Enregistrer un commentaire