params.gpx = hashParams.gpx;
}
- id.attr("src", id.data("url") + "#" + querystring.stringify(params));
+ id.attr("src", id.data("url") + "#" + qs.stringify(params));
} else {
alert(I18n.t("site.edit.id_not_configured"));
}
var iframe = $("<iframe>")
.hide()
.appendTo("body")
- .attr("src", url + querystring.stringify(query))
+ .attr("src", url + qs.stringify(query))
.on("load", function () {
$(this).remove();
loaded = true;
};
page.load = function () {
- var params = querystring.parse(location.search.substring(1));
+ var params = qs.parse(location.search.substring(1));
if (params.query) {
$("#sidebar .search_form input[name=query]").value(params.query);
}
lat = latlng.lat.toFixed(precision),
lng = latlng.lng.toFixed(precision);
- OSM.router.route("/directions?" + querystring.stringify({
+ OSM.router.route("/directions?" + qs.stringify({
from: lat + "," + lng,
to: $("#route_to").val()
}));
lat = latlng.lat.toFixed(precision),
lng = latlng.lng.toFixed(precision);
- OSM.router.route("/directions?" + querystring.stringify({
+ OSM.router.route("/directions?" + qs.stringify({
from: $("#route_from").val(),
to: lat + "," + lng
}));
var from = endpoints[0].latlng,
to = endpoints[1].latlng;
- OSM.router.route("/directions?" + querystring.stringify({
+ OSM.router.route("/directions?" + qs.stringify({
from: $("#route_to").val(),
to: $("#route_from").val(),
route: to.lat + "," + to.lng + ";" + from.lat + "," + from.lng
var precision = OSM.zoomPrecision(map.getZoom());
- OSM.router.replace("/directions?" + querystring.stringify({
+ OSM.router.replace("/directions?" + qs.stringify({
engine: chosenEngine.id,
route: o.lat.toFixed(precision) + "," + o.lng.toFixed(precision) + ";" +
d.lat.toFixed(precision) + "," + d.lng.toFixed(precision)
getRoute(true, true);
});
- var params = querystring.parse(location.search.substring(1)),
+ var params = qs.parse(location.search.substring(1)),
route = (params.route || "").split(";"),
from = route[0] && L.latLng(route[0].split(",")),
to = route[1] && L.latLng(route[1].split(","));
map.addLayer(noteLayer);
- var params = querystring.parse(path.substring(path.indexOf("?") + 1));
+ var params = qs.parse(path.substring(path.indexOf("?") + 1));
var markerLatlng;
if (params.lat && params.lon) {
};
page.load = function (path, noCentre) {
- var params = querystring.parse(path.substring(path.indexOf("?") + 1)),
+ var params = qs.parse(path.substring(path.indexOf("?") + 1)),
latlng = L.latLng(params.lat, params.lon);
if (!window.location.hash && !noCentre && !map.getBounds().contains(latlng)) {
var page = {};
page.pushstate = page.popstate = function (path) {
- var params = querystring.parse(path.substring(path.indexOf("?") + 1));
+ var params = qs.parse(path.substring(path.indexOf("?") + 1));
$(".search_form input[name=query]").val(params.query);
$(".describe_location").hide();
OSM.loadSidebarContent(path, page.load);
}
var url = window.location.protocol + "//" + OSM.SERVER_URL + "/",
- query = querystring.stringify(params),
+ query = qs.stringify(params),
hash = OSM.formatHash(this);
if (query) url += "?" + query;
params[this._object.type] = this._object.id;
}
- var query = querystring.stringify(params);
+ var query = qs.stringify(params);
if (query) {
str += "?" + query;
}
// Attach referer to authentication buttons
$(".auth_button").each(function () {
- var params = querystring.parse(this.search.substring(1));
+ var params = qs.parse(this.search.substring(1));
params.referer = $("#referer").val();
- this.search = querystring.stringify(params);
+ this.search = qs.stringify(params);
});
// Add click handler to show OpenID field
if (referer) {
args.referer = referer;
}
- window.location = action + "?" + querystring.stringify(args);
+ window.location = action + "?" + qs.stringify(args);
return false;
});
});
return args;
}
- hash = querystring.parse(hash.substr(i + 1));
+ hash = qs.parse(hash.substr(i + 1));
var map = (hash.map || '').split('/'),
zoom = parseInt(map[0], 10),