Google Maps API not centering the Marker

后端 未结 2 1469
抹茶落季
抹茶落季 2021-01-19 12:28

I have Google Maps on a website that sets the marker based on an address.

Here\'s an example (click the location tab): http://www.weddinghouse.com.au/wedding-directo

2条回答
  •  伪装坚强ぢ
    2021-01-19 12:42

    For me, the problem was the iframe having size 0 (display:hidden) when the map was loaded. I added a delay to load the map after the iframe was loaded. This race condition could explain why some of the addresses rendered correctly.

    Perhaps try this:

    
    

    (thanks to https://groups.google.com/forum/#!topic/google-maps-api/nN0y2pSr2dQ)

提交回复
热议问题