ti.map icon indicating copy to clipboard operation
ti.map copied to clipboard

Old pin style annotations

Open focussing opened this issue 2 years ago • 1 comments

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

focussing avatar Aug 22 '23 18:08 focussing

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();

m1ga avatar Jun 23 '24 08:06 m1ga