Quantcast
Viewing all articles
Browse latest Browse all 8068

mapView "userLocation" not working on Android !?

Hi,

I'm trying to show user's current location by using

userLocation: true
Unfortunately, it's not working on my Android device (there's no "Blue Dot" showing on the map.) But the same code is working perfectly on my iPhone device.

Here's the full code...

var win = Ti.UI.createWindow();
 
var map = Titanium.Map.createView({
    mapType : Titanium.Map.STANDARD_TYPE,
    animate : true,
    regionFit : true,
    userLocation : true
});
 
Titanium.Geolocation.getCurrentPosition(function(e) {
    var longitude = e.coords.longitude;
    var latitude = e.coords.latitude;
 
    map.setLocation({
        latitude : latitude,
        longitude : longitude,
        latitudeDelta : 0.02,
        longitudeDelta : 0.02
    });
});
 
win.add(map);
win.open();
Any idea why Blue dot is not showing on the map in Android device ?

P.S. I've tried on SDK 1.7.1, 1.7.2, 1.7.3 and 1.8.0 (all is not working)

Best regards, Neti.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>