Google Maps API V3 fitbounds() zooms out but never in

前端 未结 12 2401
感动是毒
感动是毒 2020-12-19 03:44

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

12条回答
  •  一生所求
    2020-12-19 04:05

    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.

提交回复
热议问题