maps: display location pointer whenever device location is known (#22819)
This commit is contained in:
parent
bf1d616c0f
commit
bd7b7e2692
|
@ -82,9 +82,13 @@ L.Control.Gps = L.Control.extend({
|
|||
return this._currentLocation;
|
||||
},
|
||||
|
||||
addLayer: function() {
|
||||
this._map.addLayer(this._gpsMarker);
|
||||
},
|
||||
|
||||
activate: function() {
|
||||
this._isActive = true;
|
||||
this._map.addLayer(this._gpsMarker);
|
||||
this.addLayer();
|
||||
this._map.locate({
|
||||
enableHighAccuracy: true,
|
||||
watch: true,
|
||||
|
|
|
@ -87,6 +87,7 @@ $(window).on('load', function() {
|
|||
$map_widget.trigger('set-geolocation', e.latlng);
|
||||
});
|
||||
$map_widget.parent().parent().find('label').addClass('activity')
|
||||
gps_control.addLayer();
|
||||
map.locate({timeout: 10000, maximumAge: 300000, enableHighAccuracy: false});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue