{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}
Api

<ScriptGoogleMapsCircle>

Circular overlay on the map. Place inside a <ScriptGoogleMaps> component.

optionsOmit<google.maps.CircleOptions, 'map'>

Configuration options for the circle overlay.

Usage

<template>
  <ScriptGoogleMaps api-key="your-api-key">
    <ScriptGoogleMapsCircle
      :options="{
        center: { lat: -34.397, lng: 150.644 },
        radius: 1000,
        fillColor: '#FF0000',
        fillOpacity: 0.35,
        strokeColor: '#FF0000',
        strokeOpacity: 0.8,
        strokeWeight: 2,
      }"
    />
  </ScriptGoogleMaps>
</template>

Editable & Draggable

Allow users to resize or reposition the circle interactively.

<script setup lang="ts">
function onRadiusChanged() {
  console.log('Radius changed')
}
function onCenterChanged() {
  console.log('Center changed')
}
</script>

<template>
  <ScriptGoogleMaps api-key="your-api-key">
    <ScriptGoogleMapsCircle
      :options="{
        center: { lat: -34.397, lng: 150.644 },
        radius: 1000,
        editable: true,
        draggable: true,
        fillColor: '#4285F4',
        fillOpacity: 0.2,
      }"
      @radius_changed="onRadiusChanged"
      @center_changed="onCenterChanged"
    />
  </ScriptGoogleMaps>
</template>

Click Events

<template>
  <ScriptGoogleMaps api-key="your-api-key">
    <ScriptGoogleMapsCircle
      :options="{
        center: { lat: -34.397, lng: 150.644 },
        radius: 500,
        clickable: true,
        fillColor: '#34a853',
        fillOpacity: 0.3,
      }"
      @click="(e) => console.log('Clicked at', e.latLng?.toJSON())"
    />
  </ScriptGoogleMaps>
</template>
The options prop is deeply reactive. Updating it calls circle.setOptions() under the hood, so you can dynamically change radius, color, or position without remounting the component.