hansemannn / titanium-googlemaps

🗺 Use the Google Maps SDK in Titanium
Other
87 stars 26 forks source link

Is there any way to use a view as pin/marker? #41

Closed spaksa closed 8 years ago

hansemannn commented 8 years ago

Not directly, but using the toImage() method of every Ti.UI.View:

var myView = Ti.UI.createView({
    width: 30, 
    height: 30, 
    backgroundColor: "#ff0"
});

var annotation = maps.createAnnotation({
    latitude : 37.368122,
    longitude : -121.913653,
    image: myView.toImage()
});

I will add a note about this in the next update. Thanks!