Leaflet/Leaflet — pull request #2243 by perliedman (2013-11-26 20:47:06+00:00)
Title: Add bounds to Projection, to calculate size

This adds a bounds member to Projection, and uses it to calculate CRS size using scale. This means removing one more Spherical Mercator hardcoded instance.

I've only added bounds to EPSG3857 so far.

Points to discuss:

* Is ```bounds``` a good name, or is ```getBounds``` better?
* I think you mentioned that you'd like bounds in the CRS, while I think it's better to have it in the projection. That would mean Projection is about the projected coordinates, and CRS is about pixel coordinates
* I don't know what to think about optimizing the calculations - many of the calculations in CRS and GridLayer could be pre-computed or cached, to avoid repeating it over and over. But perhaps this optimization is drowned in other parts of Leaflet that are much larger bottlenecks? Do you have any experience or thoughts on this?