Skip to content

Commit

Permalink
Make getGeocode a private function
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKhorev committed Aug 11, 2024
1 parent 90d8777 commit 16d4433
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/assets/javascripts/index/directions-endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,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>
Expand All @@ -69,7 +69,7 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, ch

changeCallback();
});
};
}

function setLatLng(ll) {
endpoint.latlng = ll;
Expand Down

0 comments on commit 16d4433

Please sign in to comment.