Selecting location on map in iPhone
Hi
Is it possible to select a location on map view like we can do on google maps? I want to provide users the feature to select places over a map, if this is not possible in the current map view then can rendering the google maps in a webview solve my problem?
4 Answers
-
You can get the lat/long of the central point of your map using the regionChanged event.
mapview.addEventListener('regionChanged',function(evt){ Ti.API.info(evt.latitude); Ti.API.info(evt.longitude); });
-
look at map_view.js in Kitchen Sink. it shows how you can set annotations on a map. you can also show the user's current location by setting userLocation:true in the map view constructor (this is also in map_view.js)
-
This feature I know.
My question is "Can the user tap on a location on the map and the app gets to know about it's latitude and longitude?"
-
yes, look at kitchen sink's sample codes on maps.