Getting Started

vue3-google-map offers a set of composable components for easy use of Google Maps in your Vue 3 projects.



npm install vue3-google-map
# OR
yarn add vue3-google-map


Include the following script tag in your index.html (make sure to include it after Vue 3).

<script src=""></script>

Your first map

To construct a map using vue3-google-map you'll need to use the base GoogleMap component which receives your Google Maps API key, styles (e.g. setting width and height), and any MapOptions to configure your map (see this for a all the supported MapOptions). Other map features can be added to your map by passing map subcomponents (Marker, Polyline, Polygon, Rectangle, Circle, or CustomControl) to the default slot of the GoogleMap component.

  style="width: 100%; height: 500px"
    <Marker :options="{ position: center }" />

import { defineComponent } from 'vue'
import { GoogleMap, Marker } from 'vue3-google-map'

export default defineComponent({
  components: { GoogleMap, Marker },
  setup() {
    const center = { lat: 40.689247, lng: -74.044502 }

    return { center }