main
Members
- GoogleMapsApi :
Object
|undefined
An independent Vue instance that helps us to know when the Google Maps API is loaded.
Constants
- components :
Object
Export all components and mixins
- helpers :
Object
Export all helpers
Functions
- getGoogleMapsAPI()
This function helps you to get the Google Maps API when its ready on the window object
- gmapVuePluginInstallFn(Vue, options)
GmapVue install function
GoogleMapsApi : Object
| undefined
An independent Vue instance that helps us to know when the Google Maps API is loaded.
Kind: global variable
components : Object
Export all components and mixins
Kind: global constant
Properties
Name | Type | Description |
---|---|---|
HeatmapLayer | Object | Vue component HeatmapLayer |
KmlLayer | Object | Vue component KmlLayer |
Marker | Object | Vue component Marker |
Polyline | Object | Vue component Polyline |
Polygon | Object | Vue component Polygon |
Circle | Object | Vue component Circle |
Cluster | Object | Vue component Cluster |
Rectangle | Object | Vue component Rectangle |
DrawingManager | Object | Vue component DrawingManager |
InfoWindow | Object | Vue component InfoWindow |
MapLayer | Object | Vue component MapLayer |
PlaceInput | Object | Vue component PlaceInput |
Autocomplete | Object | Vue component Autocomplete |
StreetViewPanorama | Object | Vue component StreetViewPanorama |
MapElementMixin | Object | Vue component MapElementMixin |
MountableMixin | Object | Vue component MountableMixin |
helpers : Object
Export all helpers
Kind: global constant
Properties
Name | Type | Description |
---|---|---|
initGoogleMapsApi | function | function to initialize the Google Maps API |
MapElementFactory | function | function to initialize the Google Maps API |
getGoogleMapsAPI()
This function helps you to get the Google Maps API when its ready on the window object
Kind: global function
gmapVuePluginInstallFn(Vue, options)
GmapVue install function
Kind: global function
Param | Type | Default | Description |
---|---|---|---|
Vue | Object | the vue instance | |
options | Object | undefined | configuration object to initialize the GmapVue plugin | |
options.dynamicLoad | boolean | false | load the Google Maps API dynamically, if you set this to true the plugin doesn't load the Google Maps API |
options.installComponents | boolean | true | install all components |
options.autoBindAllEvents | boolean | false | auto bind all Google Maps API events |
options.load | Object | undefined | options to configure the Google Maps API | |
options.load.key | string | your Google Maps API key | |
options.load.libraries | string | "places" | the Google Maps libraries that you will use eg: 'places,drawing,visualization' |
options.load.v | string | undefined | the Google Maps API version, default latest | |
options.load.callback | string | undefined | "GoogleMapsCallback" | This must be ignored if have another callback that you need to run when Google Maps API is ready please use the customCallback option. |
options.load.customCallback | string | undefined | This option was added on v3.0.0 but will be removed in the next major release. If you already have an script tag that loads Google Maps API and you want to use it set you callback in the customCallback option and our GoogleMapsCallback callback will execute your custom callback at the end; it must attached to the window object, is the only requirement. |
gmapVuePluginInstallFn~GoogleMapsApi
Update the global GoogleMapsApi
. This will allow
components to use the google
global reactively
via:
import { getGoogleMapsAPI } from 'gmap-vue'
export default { computed: { google: getGoogleMapsAPI } }
Kind: inner property of gmapVuePluginInstallFn
gmapVuePluginInstallFn~promiseLazyCreator : function
Use a lazy to only load the API when a GMap component is loaded
Kind: inner constant of gmapVuePluginInstallFn
gmapVuePluginInstallFn~gmapApiPromiseLazy : function
The gmapApiPromiseLazy function to can wait until Google Maps API is ready
Kind: inner constant of gmapVuePluginInstallFn