Troubleshooting: Multiple Inclusions of Google Maps JavaScript API

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:

  1. Open your webpage in a browser.
  2. Right-click on the webpage and select “View Page Source” or press Ctrl+U (Windows).
  3. Once the source code is visible, use the browser’s search function (Ctrl+F or Cmd+F) to search for This will help you locate all instances where the Google Maps library is being included.
  4. 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.
  5. 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:

  1. Navigate to the Agile Store Locator settings in your WordPress dashboard.
  2. Go to ASL Settings.
  3. Look for the option labeled “Remove Other Maps Script”.
  4. 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.
Remove maps script

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.