google maps auto open infoWindow

前端 未结 1 1643
无人共我
无人共我 2021-01-29 11:19

I\'m having a problem getting info windows on my google map to auto open I have followed a tutorial here...

https://www.taniarascia.com/google-maps-apis-for-multiple-loc

1条回答
  •  别那么骄傲
    2021-01-29 11:40

    Related question (closed): Show all infowindows open

    If you want to have more than one InfoWindow open at a time you need to create one for each marker (assuming you want them open on all the markers, if you only ever want three, then only create three).

    code snippet using a createMarker function to get closure on the marker/infowindow:

    html,
    body,
    #map {
      height: 100%;
      width: 100%;
    }

    0 讨论(0)
提交回复
热议问题