remove range circles when closing portal details
This commit is contained in:
parent
7248b17ea8
commit
0f1c22cdc1
@ -95,9 +95,16 @@ window.setPortalIndicators = function(d) {
|
|||||||
).addTo(map);
|
).addTo(map);
|
||||||
else
|
else
|
||||||
portalAccessIndicator.setLatLng(coord);
|
portalAccessIndicator.setLatLng(coord);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.clearPortalIndicators = function() {
|
||||||
|
if(portalRangeIndicator) map.removeLayer(portalRangeIndicator);
|
||||||
|
portalRangeIndicator = null;
|
||||||
|
if(portalAccessIndicator) map.removeLayer(portalAccessIndicator);
|
||||||
|
portalAccessIndicator = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// highlights portal with given GUID. Automatically clears highlights
|
// highlights portal with given GUID. Automatically clears highlights
|
||||||
// on old selection. Returns false if the selected portal changed.
|
// on old selection. Returns false if the selected portal changed.
|
||||||
// Returns true if it’s still the same portal that just needs an
|
// Returns true if it’s still the same portal that just needs an
|
||||||
@ -123,4 +130,5 @@ window.unselectOldPortal = function() {
|
|||||||
if(oldPortal) portalResetColor(oldPortal);
|
if(oldPortal) portalResetColor(oldPortal);
|
||||||
selectedPortal = null;
|
selectedPortal = null;
|
||||||
$('#portaldetails').html('');
|
$('#portaldetails').html('');
|
||||||
|
clearPortalIndicators();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user