Topics

Google maps usage

Google Maps is a common library to display maps. And it is used by the core of ImpressPages and multiple plugins. If Google Maps library is included twice on a single page, a conflict will occur. To avoid this, ImpressPages has a centralized Google Maps API loader.

To load Google Maps API, execute ipLoadGoogleMaps() function in JavaScript. This function can be executed many times by many plugins with no harm. Once Google Maps API is loaded, ipGoogleMapsLoaded event is triggered. Catch it to do your actions on maps.

 Example how to correctly load Google Maps library

$(document).on('ipGoogleMapsLoaded', function () {
    //initialize map, etc.
});
ipLoadGoogleMaps();
comments powered by Disqus