Merge branch 'convert_roundabout_exits' of https://github.com/jguthrie100/openstreetmap-website into convert_roundabout_exits
This commit is contained in:
commit
e0b175d3bd
291 changed files with 114045 additions and 98685 deletions
|
@ -40,7 +40,8 @@ OSM.Directions = function (map) {
|
|||
shadowUrl: OSM.MARKER_SHADOW,
|
||||
shadowSize: [41, 41]
|
||||
}),
|
||||
draggable: true
|
||||
draggable: true,
|
||||
autoPan: true
|
||||
});
|
||||
|
||||
endpoint.marker.on('drag dragend', function (e) {
|
||||
|
@ -53,6 +54,10 @@ OSM.Directions = function (map) {
|
|||
}
|
||||
});
|
||||
|
||||
input.on("keydown", function() {
|
||||
input.removeClass("error");
|
||||
});
|
||||
|
||||
input.on("change", function (e) {
|
||||
awaitingGeocode = true;
|
||||
|
||||
|
@ -64,6 +69,7 @@ OSM.Directions = function (map) {
|
|||
endpoint.setValue = function(value, latlng) {
|
||||
endpoint.value = value;
|
||||
delete endpoint.latlng;
|
||||
input.removeClass("error");
|
||||
input.val(value);
|
||||
|
||||
if (latlng) {
|
||||
|
@ -86,7 +92,8 @@ OSM.Directions = function (map) {
|
|||
endpoint.awaitingGeocode = false;
|
||||
endpoint.hasGeocode = true;
|
||||
if (json.length === 0) {
|
||||
alert(I18n.t('javascripts.directions.errors.no_place'));
|
||||
input.addClass("error");
|
||||
alert(I18n.t('javascripts.directions.errors.no_place', {place: endpoint.value}));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue