Skip to content

Instantly share code, notes, and snippets.

@asb-school
Created April 19, 2013 18:59
Show Gist options
  • Select an option

  • Save asb-school/5422424 to your computer and use it in GitHub Desktop.

Select an option

Save asb-school/5422424 to your computer and use it in GitHub Desktop.
find annotation and select it
// --------------------------------------------------------------
// FIND ANNOTATION WITH GIVEN TREE ID
- (void)findAnnotationWithGivenTreeId:(NSInteger)givenTreeId
{
// Search all current map annotations
// for (id<TreeAnnotation> annotation in _mapView.annotations)
for (TreeAnnotation *annotation in _mapView.annotations)
{
if (annotation.treeId == givenTreeId)
{
[_mapView selectAnnotation:annotation animated:YES];
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment