Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13875] Android: Maps V2 Module Users location is not shown on the map

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2013-05-16T20:29:47.000+0000
Affected Version/sRelease 3.1.0
Fix Version/sn/a
ComponentsAndroid
LabelssupportTeam
ReporterEduardo Gomez
AssigneeIngo Muschenetz
Created2013-05-15T21:46:15.000+0000
Updated2017-03-20T17:18:06.000+0000

Description

Steps to reproduce

(1) Grab snippet and execute it (2) Watch out device logs and monitor users location

Snippet code

var MapModule = require('ti.map');

var win = Ti.UI.createWindow({
    fullscreen : false
});

var map = MapModule.createView({

    userLocation : true,
    userLocationButton : false,
    mapType : MapModule.NORMAL_TYPE,
    animate : true,
    top : '30%', 
    region: {latitude: -33.87365, longitude: 151.20689, latitudeDelta: 0.1, longitudeDelta: 0.1 }, //Sydney

});

win.add(map);

win.open(); 


Ti.Geolocation.purpose = 'Location based services for App';
Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_BEST;
Ti.Geolocation.preferredProvider = Ti.Geolocation.PROVIDER_GPS;
Ti.Geolocation.distanceFilter = 10;
//it will be fired just once
Titanium.Geolocation.getCurrentPosition(function(e) {
    var longitude = e.coords.longitude;
    var latitude = e.coords.latitude;
    Ti.API.info( 'long:' + longitude + ' lat: ' + latitude);
    //force the map to show users current location
    map.region = {latitude: latitude, longitude: longitude, latitudeDelta: 0.1, longitudeDelta: 0.1 };
}); 

Results are as follows (logs attached):

1. HTC Incredible 2.3.4 - Users location is shown on the map.
2. Samsung Galaxy Note 2.3.6 - Users location is shown on the map.
2. Droid Razr 2.3.5 - Users location is shown on the map.
4. Samsung Galaxy Note 4.0.0 - USers location is NOT shown on the map.

Attachments

FileDateSize
HTC_Incredible_2.3.4_Updating_Location_DDMS_Log.txt2013-05-15T21:49:09.000+000070758
Samsung_Galaxy_Note_2.3.6_Updating_Location_DDMS_Log.txt2013-05-15T21:49:09.000+000037450
Samsung_Galaxy_Note_4.0.4_Updating_Location_DDMS_Log.txt2013-05-15T21:49:09.000+0000359313

Comments

  1. Hieu Pham 2013-05-16

    We tested with Galaxy Note (4.1.1) and ran into the same problem. It turned out location services wasn't enabled on our phone. Once we enabled it (Settings -> Location Services -> Google location services), current location seemed to work fine. Closing as invalid.
  2. Lee Morris 2017-03-20

    Closing ticket as invalid.

JSON Source