Titanium Community Questions & Answer Archive

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

Stopping iphone from asking current user position for map?

Hi,

I have a map view that displays a single annotation. Something like this:

var mapView = Titanium.Map.createView({
    mapType: Titanium.Map.STANDARD_TYPE,
    region:{latitude:mapRow.lat, longitude:mapRow.lng, latitudeDelta: 0.05, longitudeDelta: 0.05},
    animate:true,
    regionFit:true,
    annotations:[user]
});

The issue is that when running into a real device, it asks for user location while this is not necessary.

How can i stop it from asking for location?

Thanks!

— asked December 3rd 2010 by Fernando Morgenstern
  • iphone
  • map
1 Comment
  • is it asking the user for the location or asking the user for permission to use current location?

    — commented December 3rd 2010 by Brent Honadel

2 Answers

  • Accepted Answer

    Try this:

    var mapView = Titanium.Map.createView({
        mapType: Titanium.Map.STANDARD_TYPE,
        region:{latitude:mapRow.lat, longitude:mapRow.lng, latitudeDelta: 0.05, longitudeDelta: 0.05},
        animate:true,
        regionFit:true,
        userLocation:false,
        annotations:[user]
    });
    
    — answered December 4th 2010 by Matt Apperson
    permalink
    0 Comments
  • Hi Fernando,

    I'm not sure what the default value for userLocation is, but try adding the userLocation property with the value false.

    — answered December 3rd 2010 by Sean McEmerson
    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.