added api to show current user location from mobileclient
This commit is contained in:
parent
fe37983368
commit
4819d67f99
2 changed files with 20 additions and 0 deletions
|
@ -1394,6 +1394,13 @@ c3nav = {
|
|||
} else {
|
||||
$('.locationinput .locate, .leaflet-control-user-location a').text(c3nav._map_material_icon('location_disabled'));
|
||||
}
|
||||
if (mobileclient.isCurrentLocationRequested && mobileclient.isCurrentLocationRequested()) {
|
||||
if (location) {
|
||||
c3nav._goto_user_location_click();
|
||||
} else {
|
||||
mobileclient.currentLocationRequesteFailed()
|
||||
}
|
||||
}
|
||||
},
|
||||
_goto_user_location_click: function (e) {
|
||||
e.preventDefault();
|
||||
|
|
|
@ -46,4 +46,17 @@ mobileclient = {
|
|||
wificollectorStop: function () {
|
||||
console.log('wificollectorStop')
|
||||
},
|
||||
_currentLocationRequested: false,
|
||||
isCurrentLocationRequested: function () {
|
||||
if(mobileclient._currentLocationRequested) {
|
||||
mobileclient._currentLocationRequested = false;
|
||||
console.log('isCurrentLocationRequested→true');
|
||||
return true;
|
||||
}
|
||||
console.log('isCurrentLocationRequested→false');
|
||||
return false;
|
||||
},
|
||||
currentLocationRequesteFailed: function () {
|
||||
console.log('currentLocationRequesteFailed');
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue