vue-google-maps
vue-google-maps copied to clipboard
Provide ability to load additional Google Maps API Libraries
Is your feature request related to a problem? Please describe. Currently, there does not seem to be a way to take advantage of the various Google Maps API libraries google provides to add additional functionality to our maps.
Describe the solution you'd like A way for us to declare additional libraries we'd like to be loaded in for the script call that gets inserted into the &libraries query string parameter.
https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=library1,library2
I wanted to be able to use the computeDistanceBetween function provided by the Geometry Library but trying to include the standard google maps API script call will return an error stating that the API has been loaded twice. Providing us a way to load in additional libraries would be super helpful.
You can easily load libraries like this:
import { createApp } from 'vue'
import VueGoogleMaps from '@fawmi/vue-google-maps'
const app = createApp(App);
app.use(VueGoogleMaps, {
load: {
key: 'YOUR_API_KEY_COMES_HERE',
libraries: 'places,drawing,geometry'
},
}).mount('#app')