fawmi / vue-google-maps

Reactive Vue 3 components for Google maps
https://vue-map.netlify.app
MIT License
194 stars 99 forks source link

Retired API version warning #185

Open ricardoboss opened 1 year ago

ricardoboss commented 1 year ago

I am getting this warning in the Javascript console:

Google Maps JavaScript API warning: RetiredVersion https://developers.google.com/maps/documentation/javascript/error-messages#retired-version

Seems like the API version you are using (3.47) is retired. Can you update it so the warning disappears?

cobraprojects commented 1 year ago

I used to have the same warning. after diving inside this plugin code I found that you can set the verion you need while loadin the the plugin

load: {
    version: 3.53,
    key: 'YOUR-API-KEY',
    language: props.initialPage.props.locale,
    libraries: "places",
},
juanxodj commented 1 year ago

I used to have the same warning. after diving inside this plugin code I found that you can set the verion you need while loadin the the plugin

load: {
    version: 3.53,
    key: 'YOUR-API-KEY',
    language: props.initialPage.props.locale,
    libraries: "places",
},

Thanks!!!

martin-williams commented 1 year ago

Instead of version I had to use v

admench commented 7 months ago

If you don't want to stick to a specific numbered version and simply keep up to date with recent API updates from google, use v: 'quarterly'.

https://developers.google.com/maps/documentation/javascript/versions

MatiasJRB commented 4 months ago

hey guys, sorry but I am here asking for help I am using the last version of this package ( "@fawmi/vue-google-maps": "^0.9.79") and I can't understand how to/where update that API version I appreaciate any kind of help

ricardoboss commented 4 months ago

@MatiasJRB you have to pass it in the options param:

<g-map-map
    :center="center"
    :zoom="zoom ?? 7"
    :options="{
      streetViewControl: false,
      rotateControl: false,
      version: 'weekly', <----- here
    }"
  >
    ...
</g-map-map>
MatiasJRB commented 4 months ago

thank you @ricardoboss for that quick response! unfortunately I'm still having the issue trying both, weekly and 3.53

        <GMapMap
            v-if="googlePlace"
            :center="passengerPosition"
            :zoom="15"
            class="flex flex-center"
            map-type-id="terrain"
            style="width: 70%; height: 50vh"
            :options="{
              zoomControl: false,
              mapTypeControl: false,
              scaleControl: false,
              streetViewControl: false,
              rotateControl: false,
              fullscreenControl: false,
              disableDefaultUi: true,
              version: 'weekly'
            }"
          >
            <GMapMarker
              :position="passengerPosition"
              :clickable="true"
              :icon="personSVGPath"
            />
          </GMapMap>
Screenshot 2024-03-19 at 22 57 15
ricardoboss commented 4 months ago

Do you use multiple maps? Can you reproduce the problem with a minimal example?

MatiasJRB commented 4 months ago

sorry, multiple maps? I was able to find the VUE plugin setup and add the v property there as cobraprojects and vue2 google maps suggested thank you ricardo you are the boss