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

前端 未结 12 2397
感动是毒
感动是毒 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:04

    That's right, fitBounds only ensures that the provided bounds are visible. It doesn't zoom in to an appropriate level.

    You could first call setZoom(20), then fitBounds.

提交回复
热议问题