Files
vue-google-maps-community-fork/docs/src/components/info-window.md
2021-02-14 10:49:10 +01:00

715 B
Executable File

Info Window

You can create info window by passing custom HTML or Vue components as the child of Marker component.

  <GmapMap>
    <GmapMarker
      :key="index"
      v-for="(m, index) in markers"
    >
      <GmapInfoWindow>
        <div>I am in info window <MyComponent/>
        </div>
      </GmapInfoWindow>
    </GmapMarker>
</GmapMap>

Open/close info window

You can pass opened prop to open and close InfoWindows.

  <GmapMap>
    <GmapMarker
      :key="index"
      v-for="(m, index) in markers"
    >
      <GmapInfoWindow
        :opened="true"
      >
        <div>I am in info window <MyComponent/>
        </div>
      </GmapInfoWindow>
    </GmapMarker>
</GmapMap>