Google maps open info window by default?

后端 未结 4 655
情话喂你
情话喂你 2020-12-13 01:44

The following example shows a simple Marker (standard icon) on Google maps for the location and when clicking the icon, it opens the info window. Can I show the info window

4条回答
  •  死守一世寂寞
    2020-12-13 02:25

    The code above works perfectly. However, the my map didnt shift around so that the infowindow was being fully shown. Instead, the pushpin stayed in the middle.

    So how do you make the map adjust itself so the info window is fully viewable? Read this: Google Maps : auto center map on marker click

    If you want the pushpin to stay where it is and not shift the map, read this: Google Maps: How to prevent InfoWindow from shifting the map

    Hope that helps people take the next step

提交回复
热议问题