Google Map multiple infowindow does not work

前端 未结 2 426
天命终不由人
天命终不由人 2021-01-07 11:13

I tried to add multiple markers and infowindow to a google map using javascript. Below is the code:






        
2条回答
  •  一向
    一向 (楼主)
    2021-01-07 11:50

    The geocoder is asynchronous, you need to add the infowindow inside the geocoder call back. Where you have it currently it runs before any of the markers are defined. I would think you would get a javascript error.

提交回复
热议问题