Table of Contents
If your webpage is experiencing issues due to multiple inclusions of the Google Maps JavaScript API, it’s often because another plugin or the website’s theme itself is also injecting the Google Maps library. This can lead to conflicts or unexpected behavior in your map functionality.
Step 1: Identifying the Source of the Conflict #
To identify the source of the conflict:
- Open your webpage in a browser.
- Right-click on the webpage and select “View Page Source” or press
Ctrl+U
(Windows). - Once the source code is visible, use the browser’s search function (
Ctrl+F
orCmd+F
) to search formaps.google
. This will help you locate all instances where the Google Maps library is being included. - Check the URLs or script tags that include the Google Maps API to determine if they are being added by your theme or another plugin.
- So, once you figure out, you need to disable that plugin or disable that functionality in the theme.
Step 2: Resolving the Issue Using Agile Store Locator #
If you are using the Agile Store Locator plugin, it offers a solution to this common problem:
- Navigate to the Agile Store Locator settings in your WordPress dashboard.
- Go to ASL Settings.
- Look for the option labeled “Remove Other Maps Script”.
- Enable this option. This setting attempts to remove any other instances of the Google Maps script that are not part of the Agile Store Locator plugin.
By following these steps, you should be able to diagnose and potentially resolve conflicts arising from multiple inclusions of the Google Maps JavaScript API on your webpage. If you need additional assistance, our support team is here to help.