show user location on other levels dimly as well
This commit is contained in:
parent
87c0a2f757
commit
3eb9bbd00c
1 changed files with 15 additions and 10 deletions
|
@ -1406,16 +1406,21 @@ c3nav = {
|
||||||
$('.locationinput .locate, .leaflet-control-user-location a').text(c3nav._map_material_icon('my_location'));
|
$('.locationinput .locate, .leaflet-control-user-location a').text(c3nav._map_material_icon('my_location'));
|
||||||
var latlng = L.GeoJSON.coordsToLatLng(location.geometry.coordinates),
|
var latlng = L.GeoJSON.coordsToLatLng(location.geometry.coordinates),
|
||||||
layer = c3nav._userLocationLayers[location.level];
|
layer = c3nav._userLocationLayers[location.level];
|
||||||
L.circleMarker(latlng, {
|
for (level in c3nav._userLocationLayers) {
|
||||||
radius: 11,
|
if (!c3nav._userLocationLayers.hasOwnProperty(level)) continue;
|
||||||
stroke: 0,
|
layer = c3nav._userLocationLayers[level];
|
||||||
fillOpacity: 0.1
|
factor = (level === location.level) ? 1 : 0.5;
|
||||||
}).addTo(layer);
|
L.circleMarker(latlng, {
|
||||||
L.circleMarker(latlng, {
|
radius: 11,
|
||||||
radius: 5,
|
stroke: 0,
|
||||||
stroke: 0,
|
fillOpacity: 0.1 * factor
|
||||||
fillOpacity: 1
|
}).addTo(layer);
|
||||||
}).addTo(layer);
|
L.circleMarker(latlng, {
|
||||||
|
radius: 5,
|
||||||
|
stroke: 0,
|
||||||
|
fillOpacity: 1 * factor
|
||||||
|
}).addTo(layer);
|
||||||
|
}
|
||||||
$('.leaflet-control-user-location a').toggleClass('control-disabled', false);
|
$('.leaflet-control-user-location a').toggleClass('control-disabled', false);
|
||||||
} else if (c3nav.hasLocationPermission()) {
|
} else if (c3nav.hasLocationPermission()) {
|
||||||
$('.locationinput .locate, .leaflet-control-user-location a').text(c3nav._map_material_icon('location_searching'));
|
$('.locationinput .locate, .leaflet-control-user-location a').text(c3nav._map_material_icon('location_searching'));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue