- var bounds = map.getBounds();
- var west = bounds.getWest();
- var east = bounds.getEast();
-
- if ((east - west) >= 360) { // covers more than whole planet
- west = map.getCenter().lng-179.999;
- east = map.getCenter().lng+179.999;
- }
- east = L.latLng(77, east).wrap().lng;
- west = L.latLng(77, west).wrap().lng;
-
- return [
- west.toFixed(5), // left
- bounds.getNorth().toFixed(5), // top
- east.toFixed(5), // right
- bounds.getSouth().toFixed(5) // bottom
- ].join(',');
+ var bounds = map.getBounds();
+ var west = bounds.getWest();
+ var east = bounds.getEast();
+
+ if ((east - west) >= 360) { // covers more than whole planet
+ west = map.getCenter().lng - 179.999;
+ east = map.getCenter().lng + 179.999;
+ }
+ east = L.latLng(77, east).wrap().lng;
+ west = L.latLng(77, west).wrap().lng;
+
+ return [
+ west.toFixed(5), // left
+ bounds.getNorth().toFixed(5), // top
+ east.toFixed(5), // right
+ bounds.getSouth().toFixed(5) // bottom
+ ].join(',');