Skip to content

Marker

DEPRECATED

The Marker component is deprecated as of February 2024. Please use the AdvancedMarker component instead for new projects. The legacy google.maps.Marker API will be removed in a future version. Learn more about the deprecation.

Use the Marker component to draw markers, drop pins or any custom icons on a map.

Options

You can pass a MarkerOptions object to the options prop to configure your marker.

vue
<script setup>
import { GoogleMap, Marker } from 'vue3-google-map'

const center = { lat: 40.689247, lng: -74.044502 }
const markerOptions = { position: center, label: 'L', title: 'LADY LIBERTY' }
</script>

<template>
  <GoogleMap
    api-key="YOUR_GOOGLE_MAPS_API_KEY"
    style="width: 100%; height: 500px"
    :center="center"
    :zoom="15"
  >
    <Marker :options="markerOptions" />
  </GoogleMap>
</template>

Events

You can listen for the following events on the Marker component.