]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.map.js
Merge remote-tracking branch 'upstream/pull/2509'
[rails.git] / app / assets / javascripts / leaflet.map.js
index 4d9fbac8e35167e951f96f8cfd26bc15225cb9b9..797a57e20db99e35c6f46e2f5b67739646dec0f2 100644 (file)
@@ -1,3 +1,5 @@
+//= require querystring
+
 L.extend(L.LatLngBounds.prototype, {
   getSize: function () {
     return (this._northEast.lat - this._southWest.lat) *
@@ -114,7 +116,8 @@ L.OSM.Map = L.Map.extend({
       params.mlon = latLng.lng.toFixed(precision);
     }
 
-    var url = window.location.protocol + "//" + OSM.SERVER_URL + "/",
+    var querystring = require("querystring-component"),
+        url = window.location.protocol + "//" + OSM.SERVER_URL + "/",
         query = querystring.stringify(params),
         hash = OSM.formatHash(this);
 
@@ -180,7 +183,8 @@ L.OSM.Map = L.Map.extend({
       params[this._object.type] = this._object.id;
     }
 
-    var query = querystring.stringify(params);
+    var querystring = require("querystring-component"),
+        query = querystring.stringify(params);
     if (query) {
       str += "?" + query;
     }