Remove endpoint markers in disable method
This commit is contained in:
parent
64da05f8ff
commit
a8838b3727
2 changed files with 3 additions and 3 deletions
|
@ -24,6 +24,8 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, ch
|
|||
endpoint.marker.off("drag dragend", markerDragListener);
|
||||
input.off("keydown", inputKeydownListener);
|
||||
input.off("change", inputChangeListener);
|
||||
|
||||
map.removeLayer(endpoint.marker);
|
||||
};
|
||||
|
||||
function markerDragListener(e) {
|
||||
|
|
|
@ -326,9 +326,7 @@ OSM.Directions = function (map) {
|
|||
|
||||
map
|
||||
.removeLayer(popup)
|
||||
.removeLayer(polyline)
|
||||
.removeLayer(endpoints[0].marker)
|
||||
.removeLayer(endpoints[1].marker);
|
||||
.removeLayer(polyline);
|
||||
};
|
||||
|
||||
return page;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue