Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Old pin style annotations #636

Open
focussing opened this issue Aug 22, 2023 · 1 comment
Open

Old pin style annotations #636

focussing opened this issue Aug 22, 2023 · 1 comment

Comments

@focussing
Copy link

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

@m1ga
Copy link
Contributor

m1ga commented Jun 23, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants