]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/map.js.erb
Replace various Leaflet extensions with new builtin methods
[rails.git] / app / assets / javascripts / map.js.erb
index bb1c9a35858f7b45523b25ccc10b1bae3d38d7d0..8b621e3aed4473302d4963473b7c9d75556e8d36 100644 (file)
@@ -1,31 +1,5 @@
 // Leaflet extensions
 L.extend(L.LatLngBounds.prototype, {
-  getSouthLat: function () {
-    return this._southWest.lat;
-  },
-
-  getWestLng: function () {
-    return this._southWest.lng;
-  },
-
-  getNorthLat: function () {
-    return this._northEast.lat;
-  },
-
-  getEastLng: function () {
-    return this._northEast.lng;
-  },
-
-  toBBOX: function () {
-    var decimal = 6;
-    var mult = Math.pow(10, decimal);
-    var xmin = Math.round(this.getWestLng() * mult) / mult;
-    var ymin = Math.round(this.getSouthLat() * mult) / mult;
-    var xmax = Math.round(this.getEastLng() * mult) / mult;
-    var ymax = Math.round(this.getNorthLat() * mult) / mult;
-    return xmin + "," + ymin + "," + xmax + "," + ymax;
-  },
-
   getSize: function () {
     return (this._northEast.lat - this._southWest.lat) *
            (this._northEast.lng - this._southWest.lng);
@@ -36,16 +10,6 @@ L.extend(L.LatLngBounds.prototype, {
   }
 });
 
-L.extend(L.Bounds.prototype, {
-  getWidth: function () {
-   return this.max.x - this.min.x;
-  },
-
-  getHeight: function () {
-   return this.max.y - this.min.y;
-  }
-});
-
 L.Icon.Default.imagePath = <%= "#{asset_prefix}/images".to_json %>;
 
 var map;