Remove endpoint/input values on disable

This commit is contained in:
Anton Khorev 2024-08-12 07:29:27 +03:00
parent 20f8fadd7b
commit 1e9603c7b1

View file

@ -27,6 +27,9 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, ch
if (endpoint.geocodeRequest) endpoint.geocodeRequest.abort();
delete endpoint.geocodeRequest;
removeLatLng();
delete endpoint.value;
input.val("");
map.removeLayer(endpoint.marker);
};