The new documentation page is ready and it contains all examples for any component in the plugin.
You can use your own gmap key in order to test it in the live example section.
We have planed improve and grow all required documentation about the plugin.
Please follow next link to our documentation.
Vue-2 port of vue-google-maps
This is a fork of the popular vue2-google-maps. As the author of the library no longer commit to maintain the project, we forked it to develop and maintain the project.
If you have time to contribute to a rather frequently used library, feel free to make a PR! For more background, please refer to this issue.
What's urgently needed are:
- Better automated tests
- Better integration tests with the popular frameworks, especially Nuxt and Vue template
Better documentation (examples, recommendations)
The above three will go a long way to keeping the project maintainable and contributable, and will address many of the open issues.
autobindAllEventsconfig option was renamed to
vueGoogleMapsInitname was renamed to
gmapApifunction was renamed to
MapElementMixinnow is exported from
componentsobject instead of
customCallbackconfig option was added to reuse existing Google Maps API that already loaded, eg from an HTML file
All components were rewriting in SFC (
MarkerClusterwas renamed to
@google/markerclustererpluswas replace for
The plugin exports two main objects:
components: it has all components and mountable mixin)
helpers: it has promise lazy factory function, gmapApi function and map element mixin
The plugin now exports by default the install function, this means that you can do the following
From v2.0.0 and above, the
autocompletecomponent uses the
defaultslot instead of the named
inputslot, from v1.5.0 the
inputslot on the autocomplete component still works.
import GmapVue from 'gmap-vue';
import * as GmapVue from 'gmap-vue';
npm install gmap-vue --save
yarn add gmap-vue
dist/gmap-vue.js file and include it from your HTML.
You can use a free CDN like jsdelivr to include this plugin in your html file
You can use a free CDN like unpkg to include this plugin in your html file
Be aware that if you use this method, you cannot use TitleCase for your components and your attributes.
That is, instead of writing
<GmapMap>, you need to write