Skip to main content

Components entrypoint

Import Vue component objects from @gmap-vue/v3/components when you want to register only the components your app needs.

import {
Autocomplete,
Circle,
Cluster,
DrawingManager,
HeatmapLayer,
InfoWindow,
KmlLayer,
MapLayer,
Marker,
Polygon,
Polyline,
Rectangle,
StreetViewPanorama,
} from '@gmap-vue/v3/components';

Exported components

ExportGlobal plugin namePurpose
MapLayerGmvMapBase Google Map component.
MarkerGmvMarkerAdvanced Marker on the map.
InfoWindowGmvInfoWindowInfo window anchored to a marker or position.
AutocompleteGmvAutocompletePlaces autocomplete input wrapper.
CircleGmvCircleCircle overlay.
PolygonGmvPolygonPolygon overlay.
PolylineGmvPolylinePolyline overlay.
RectangleGmvRectangleRectangle overlay.
KmlLayerGmvKmlLayerKML layer.
HeatmapLayerGmvHeatmapLayerHeatmap layer.
StreetViewPanoramaGmvStreetViewPanoramaStandalone Street View panorama.
ClusterGmvClusterMarker clustering component.
DrawingManagerGmvDrawingManagerLegacy Drawing Library wrapper.

Typing component refs

These exports are Vue components, not Google Maps classes. When you need a component ref in TypeScript, use Vue component typing.

import { ref } from 'vue';
import { MapLayer } from '@gmap-vue/v3/components';

const mapRef = ref<InstanceType<typeof MapLayer> | null>(null);

For direct Google Maps instances, prefer the composables from @gmap-vue/v3/composables, such as useMapPromise and useMarkerPromise.