Created
May 7, 2012 18:03
-
-
Save rknLA/2629350 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)addMarkerAt:(CLLocationCoordinate2D)position forHotspot:(Hotspot *)hotspot | |
{ | |
UIImage *pinImage = unvisitedPin; | |
if ([hotspot.visited boolValue]) { | |
pinImage = visitedPin; | |
} | |
CLLocationCoordinate2D annotationCoord; | |
annotationCoord.latitude = [hotspot.latitude doubleValue]; | |
annotationCoord.longitude = [hotspot.longitude doubleValue]; | |
RMAnnotation *annotationPoint = [[RMAnnotation alloc] initWithMapView:mapView | |
coordinate:annotationCoord | |
andTitle:hotspot.name]; | |
[annotationPoint setAnnotationIcon:pinImage]; | |
[mapView addAnnotation:annotationPoint]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment