- Configuration
- API
- Main
- Events
- Overlays
- Layers
- Mixed
- Tools
Google Maps Library Configuration
If the Google Maps library is not loaded, gmap3 will load it asynchronously as described on the official page.
Nevertheless, you can disable it or provide your own configuration (API key...)
There are three way to configure the google maps library.
Load google maps library into the <head>
If so, gmap3 will detects it and not try to load it again.
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY®ion=GB"></script>
Let gmap3 load the library
Optionally, you can provide a configuration set to the loader. (full example)
$.gmap3({
key: 'AIzaSyAdY8R5lQPdDO_ffF9WADgbYVsYmpfv3Vw'
});
Disable the loader to handle your own async load
Sometime, you may want to disable the loader to handle your own. (full example)
$.gmap3(false); // disable gmap3 loader
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAdY8R5lQPdDO_ffF9WADgbYVsYmpfv3Vw&callback=initMap"></script>