Last active
October 4, 2019 21:32
-
-
Save mousebird/6658dc58ed29949d081a to your computer and use it in GitHub Desktop.
Marker Cluster Example
This file contains 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
NSMutableArray *markers = [NSMutableArray array]; | |
UIImage *pinImage = [UIImage imageNamed:@"map_pin"]; | |
// Work through the locations | |
for (unsigned int ii=0;ii<howMany;ii++) | |
{ | |
LocationInfo *location = &locations[ii]; | |
MaplyScreenMarker *marker = [[MaplyScreenMarker alloc] init]; | |
marker.image = pinImage; | |
marker.size = CGSizeMake(32,32); | |
marker.loc = MaplyCoordinateMakeWithDegrees(location->lon , location->lat); | |
marker.layoutImportance = 1.0; | |
[markers addObject:marker]; | |
} | |
markerClusterObj = [baseViewC addScreenMarkers:markers desc:@{kMaplyClusterGroup: @(0)} mode:MaplyThreadAny]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment