Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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?

— asked April 1st 2010 by Dev Priya
  • iphone
  • location
  • map
  • selection
0 Comments

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);    
    });
    
    — answered April 1st 2010 by Andrew Burgess
    permalink
    0 Comments
  • 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)

    — answered April 1st 2010 by Nolan Wright
    permalink
    0 Comments
  • 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?"

    — answered April 1st 2010 by Dev Priya
    permalink
    0 Comments
  • yes, look at kitchen sink's sample codes on maps.

    — answered April 1st 2010 by Peter Lum
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.