Skip to content

Instantly share code, notes, and snippets.

@fitomad
Created September 3, 2018 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitomad/b31795e82d850bbc8b07bc27bc24a7e0 to your computer and use it in GitHub Desktop.
Save fitomad/b31795e82d850bbc8b07bc27bc24a7e0 to your computer and use it in GitHub Desktop.
// 1
let coordinate = new mapkit.Coordinate(venue.spatial.latitude, venue.spatial.longitude);
// 2
let options = {
url : {
1 : "images/venues/" + venue.id + "@1x.png",
2 : "images/venues/" + venue.id + "@2x.png",
3 : "images/venues/" + venue.id + "@3x.png"
},
size : {
width : 50,
height : 50
},
accessibilityLabel : venue.title
};
// 3
var annotation = new mapkit.ImageAnnotation(coordinate, options);
// Clustering setup
annotation.clusteringIdentifier = "AustriasCollectionCluster";
annotation.collisionMode = mapkit.Annotation.CollisionMode.Circle;
annotation.displayPriority = mapkit.Annotation.DisplayPriority.High;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment