1

The question arose as to how to dynamically delete google maps, and/or unsubscribe from the event of creating (loading) the map.

I use vue2-google-maps.

main.js:

const { lang } = localStorage.getItem('lang') || 'en';
Vue.use(VueGoogleMaps, {
  load: {
    key: config.TOKEN_GOOGLE,
    language: lang,
    libraries: ['places', 'visualization']
  }
});
KolisbikBoh
  • 85
  • 2
  • 10
  • I assume you are asking about if there is a way to "un-use" a plugin after attaching it to the Vue instance? I found [this other thread](https://stackoverflow.com/questions/57415676/is-there-something-like-vue-unuse-to-stop-using-a-plugin) and it didn't seem to yield any answers. You could maybe [write your own plugin](https://vuejs.org/v2/guide/plugins.html#Writing-a-Plugin) that dynamically adds/removes `VueGoogleMaps` from the instance? – Ollie Sep 04 '20 at 13:00

0 Answers0