Google maps V3 custom marker images and fitBounds()

后端 未结 2 1491
清酒与你
清酒与你 2021-01-24 10:57

I am trying to get my custom markers to show up on my map after i have used the fitBounds() method to fit the boundaries of the map to the markers themselves.

I have don

2条回答
  •  清酒与你
    2021-01-24 11:44

    Since you already have calculated the bounds, you may just need to extend the bounds to add enough buffer area to include the large images. The formula you can use to calculate or extend a bounds this way is called a convex hull; the Computational Geometry Algorithms Library has a section on 2D Convex Hull Algorithms or there is a JavaScript Quickhull Article that also includes a nifty online example near the bottom of the page. Hope this is helpful -

提交回复
热议问题