endpoint.awaitingGeocode = true;
- $.getJSON('<%= NOMINATIM_URL %>search?q=' + encodeURIComponent(endpoint.value) + '&format=json', function (json) {
+ $.getJSON(document.location.protocol + '<%= NOMINATIM_URL %>search?q=' + encodeURIComponent(endpoint.value) + '&format=json', function (json) {
endpoint.awaitingGeocode = false;
endpoint.hasGeocode = true;
if (json.length == 0) {
d = endpoints[1].latlng;
if (!o || !d) return;
+ $("header").addClass("closed");
var precision = OSM.zoomPrecision(map.getZoom());
$(".directions_form").on("submit", function(e) {
e.preventDefault();
- $("header").addClass("closed");
getRoute();
});