inocan-group / vue3-google-map

A set of composable components for easy use of Google Maps in your Vue 3 projects.
https://vue3-google-map.com
MIT License
296 stars 60 forks source link

Map doesn't work in nuxt 3 #189

Closed hakimov-dev closed 11 months ago

hakimov-dev commented 11 months ago

Hey i've some problems of using this package, here my codes:

Template:

   <GoogleMap
          api-key="my_map_key"
          class="w-full rounded-[10px] z-10 pointer-events-none h-[450px]"
          :center="center"
          :zoom="15"
        >
          <Marker :options="{ position: center }" />
        </GoogleMap>

Script:

<script>
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 };
  },
});
</script>

"vue": "^3.3.8", "vue3-google-map": "^0.18.0"

I was just copied of documentation's code and pasted.

Result: image