ti.map
ti.map copied to clipboard
Old pin style annotations
In earlier versions of the Ti SDK for annotations a multi-color "pin" symbol was used. Chapter 3.2 in this document describes a way to use these 'old style' pin annotations MKPinAnnotationView instead of the balloon shaped MKMarkerAnnotationView.
I am not an expert in the Apple programming languages, but could somebody make this pin-annotation available in Ti.map again?
Looking forward to hearing from you, Best regards, Raymond
just a quick note here as it was asked on Slack too:
in case you want to use a different color you can use markerColor now to tint the balloon shaped marker. This will show a green marker:
const win = Ti.UI.createWindow();
import Map from 'ti.map';
const mountainView = Map.createAnnotation({
latitude: 37.390749,
longitude: -122.081651,
title: 'old Appcelerator Headquarters',
markerColor: "green",
});
const mapView = Map.createView({
mapType: Map.NORMAL_TYPE,
region: {
latitude: 37.390749,
longitude: -122.081651,
latitudeDelta: 0.01,
longitudeDelta: 0.01
},
animate: true,
regionFit: true,
userLocation: true,
annotations: [ mountainView ]
});
win.add(mapView);
win.open();