In OpenLayers, you can do something slick like this:
var poly = wkt.read(' ... ');
var bounds = poly.geometry.getBounds();
map.zoomToExtent(bounds);
Is there a way to make that happen in Leaflet?
Ah, I think figured it out. RTFM, jerkus. How's something like this look?
var southWest = new L.LatLng(34.0177295716, -118.470884195),
northEast = new L.LatLng(34.0524049939, -118.430298),
bounds = new L.LatLngBounds(southWest, northEast);
map.fitBounds(bounds);
And you could dynamically fill in those corners, and I think you'd be flying.
I didn't yet document it but you can also do polyline.getBounds(). As for WKT, there's no Leaflet parser for it but it would be quite easy to write, so I think such plugin will appear soon.
Most helpful comment
Ah, I think figured it out. RTFM, jerkus. How's something like this look?
And you could dynamically fill in those corners, and I think you'd be flying.