I have an overlay that is dynamically generated from user data, so I need to know how to find the center of that overlay.
Currently, I am just using the first coordinate
Based on @tux21b,
var bounds = new google.maps.LatLngBounds(); polyline.getPath().forEach(function(e){//can't do polyline.getPath()[i] because it's a MVCArray bounds.extend(e); }) _map.fitBounds(bounds);