lat = latlng.lat.toFixed(precision),
lng = latlng.lng.toFixed(precision);
- OSM.router.route("/search?whereami=1&query=" + encodeURIComponent(lat + "," + lng));
+ OSM.router.route("/search?lat=" + encodeURIComponent(lat) + "&lon=" + encodeURIComponent(lng));
}
});
$(".describe_location").on("click", function (e) {
e.preventDefault();
var center = map.getCenter().wrap(),
- precision = OSM.zoomPrecision(map.getZoom());
- OSM.router.route("/search?whereami=1&query=" + encodeURIComponent(
- center.lat.toFixed(precision) + "," + center.lng.toFixed(precision)
- ));
+ precision = OSM.zoomPrecision(map.getZoom()),
+ lat = center.lat.toFixed(precision),
+ lng = center.lng.toFixed(precision);
+
+ OSM.router.route("/search?lat=" + encodeURIComponent(lat) + "&lon=" + encodeURIComponent(lng));
});
$("#sidebar_content")
elsif latlon = query.match(%r{^([+-]?\d+(\.\d*)?)(?:\s+|\s*[,/]\s*)([+-]?\d+(\.\d*)?)$})
params.merge!(:lat => latlon[1].to_f, :lon => latlon[3].to_f).delete(:query)
- params[:latlon_digits] = true unless params[:whereami]
+ params[:latlon_digits] = true
end
end