In my app I serialize and deserialize bbox strings. This coffee code helps me out:
L.latLngBounds.fromBBoxString = L.latLngBounds.fromBBoxString or (bbox) ->
[west, south, east, north] = bbox.split(',').map(parseFloat)
new L.LatLngBounds(new L.LatLng(south, west), new L.LatLng(north, east))
Imho this functionality could fit in Leaflet core
:-1: this should stay in helpers, not in core. BBOX encoding is opinionated, constructor bloat is bad, and this is easy to implement outside of core.
Agreed.
It's no less opinionated than toBBoxString(), but certainly more difficult to implement properly (missing parameters, max-min order etc). Right now the class lacks symmetry, which is usually a good thing to have.
Most helpful comment
It's no less opinionated than toBBoxString(), but certainly more difficult to implement properly (missing parameters, max-min order etc). Right now the class lacks symmetry, which is usually a good thing to have.