I\'ve created a quite complex store locator of sorts. The user enters their zip and a table returns results with corresponding markers on a map. They can page through result
fitBounds: function(bounds, mapId) { //bounds: bounds, id: map id if (bounds==null) return false; maps[mapId].fitBounds(bounds); },
This should help, i use this method and works fine, on map v2 a little bit different way.