Make getGeocode a private function

This commit is contained in:
Anton Khorev 2024-08-11 07:04:37 +03:00
parent 51cbbe6d5a
commit 89a35fe11f

View file

@ -44,11 +44,11 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, ch
setInputValueFromLatLng(latlng);
changeCallback();
} else if (endpoint.value) {
endpoint.getGeocode();
getGeocode();
}
};
endpoint.getGeocode = function () {
function getGeocode() {
endpoint.awaitingGeocode = true;
var viewbox = map.getBounds().toBBoxString(); // <sw lon>,<sw lat>,<ne lon>,<ne lat>
@ -67,7 +67,7 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, ch
changeCallback();
});
};
}
function setLatLng(ll) {
endpoint.latlng = ll;