shadowUrl: OSM.MARKER_SHADOW,
shadowSize: [41, 41]
}),
- draggable: true
+ draggable: true,
+ autoPan: true
});
endpoint.marker.on('drag dragend', function (e) {
});
input.on("keydown", function() {
- input.removeClass("highlight_error");
+ input.removeClass("error");
});
input.on("change", function (e) {
endpoint.setValue = function(value, latlng) {
endpoint.value = value;
delete endpoint.latlng;
+ input.removeClass("error");
input.val(value);
if (latlng) {
endpoint.awaitingGeocode = false;
endpoint.hasGeocode = true;
if (json.length === 0) {
+ input.addClass("error");
alert(I18n.t('javascripts.directions.errors.no_place', {place: endpoint.value}));
- input.addClass("highlight_error");
return;
}