]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.map.js
Replace querystring parser with qs yarn module
[rails.git] / app / assets / javascripts / leaflet.map.js
index 497062e440167ae3f9478e26cdf6f39952c5c2e9..d47b896177b6c10617201959ef821d15d261d27e 100644 (file)
@@ -1,4 +1,4 @@
-//= require querystring
+//= require qs/dist/qs
 
 L.extend(L.LatLngBounds.prototype, {
   getSize: function () {
@@ -49,7 +49,7 @@ L.OSM.Map = L.Map.extend({
       }));
     }
 
-    this.baseLayers.push(new L.OSM.OPNVKarte ({
+    this.baseLayers.push(new L.OSM.OPNVKarte({
       attribution: copyright + ". " + memomaps + ". " + terms,
       code: "O",
       keyid: "opnvkarte",
@@ -126,9 +126,8 @@ L.OSM.Map = L.Map.extend({
       params.mlon = latLng.lng.toFixed(precision);
     }
 
-    var querystring = require("querystring-component"),
-        url = window.location.protocol + "//" + OSM.SERVER_URL + "/",
-        query = querystring.stringify(params),
+    var url = window.location.protocol + "//" + OSM.SERVER_URL + "/",
+        query = Qs.stringify(params),
         hash = OSM.formatHash(this);
 
     if (query) url += "?" + query;
@@ -193,8 +192,7 @@ L.OSM.Map = L.Map.extend({
       params[this._object.type] = this._object.id;
     }
 
-    var querystring = require("querystring-component"),
-        query = querystring.stringify(params);
+    var query = Qs.stringify(params);
     if (query) {
       str += "?" + query;
     }