Hi there, i just want to put an annotiation to native map app in iPhone, i am using
Ti.Platform.openURL("http://maps.google.com/maps?q=");but couldn't put an annotiation to map? :(
2 Answers
Accepted Answer
var win = Ti.UI.createWindow(); var annotation = Ti.Map.createAnnotation({ latitude : 50.955944, longitude : -0.193767, animate:true, title : "A title", subtitle : 'A subtitle', pincolor : Ti.Map.ANNOTATION_PURPLE }); var mapView = Ti.Map.createView({ mapType : Ti.Map.HYBRID_TYPE, region : { latitude : p.lat, longitude : p.lng, latitudeDelta : 0.0009, longitudeDelta : 0.0009 }, animate : true, regionFit : false, userLocation : false, annotations : [ annotation] }); win.add(mapView); win.open();
Hi Gurkan,
This is opening a map in web browser which wont give you native effect. Look at the kitchen sink example for maps at (https://github.com/appcelerator/KitchenSink)
Your Answer
Think you can help? Login to answer this question!