Move empty value check out of endpoint.getGeocode
This commit is contained in:
parent
e624871eb4
commit
51cbbe6d5a
1 changed files with 1 additions and 7 deletions
|
@ -43,18 +43,12 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, ch
|
|||
setLatLng(latlng);
|
||||
setInputValueFromLatLng(latlng);
|
||||
changeCallback();
|
||||
} else {
|
||||
} else if (endpoint.value) {
|
||||
endpoint.getGeocode();
|
||||
}
|
||||
};
|
||||
|
||||
endpoint.getGeocode = function () {
|
||||
// if no one has entered a value yet, then we can't geocode, so don't
|
||||
// even try.
|
||||
if (!endpoint.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
endpoint.awaitingGeocode = true;
|
||||
|
||||
var viewbox = map.getBounds().toBBoxString(); // <sw lon>,<sw lat>,<ne lon>,<ne lat>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue