When I plot a route in google maps v3, I'm able to push to coordinates into a bounds object and then get the map to zoom to a level that shows the entire route. I'm also able to set the center of the map to equal the middle of the route:
var bounds = new google.maps.LatLngBounds();
bounds.extend(latlng); //do this for each coordinate
map.fitBounds(bounds);
map.setCenter(bounds.getCenter());
However, I've added an overlay on the left. The map is 100% screenwidth and goes underneath the overlay:
Is it possible to set the map boundaries to match what is visible? (I've highlighted what I mean with a green border) And there make sure the entire route is visible to the right of the overlay?
I hope this makes sense. Google manage to accomplish this on their map site.