Google Maps Plugin and Simplemap Store Locator plugin possible Conflict

Hi,
There is a conflict between your Google Maps Plugin and the Simplemap Store Locator plugin (http://wordpress.org/extend/plugins/simplemap/) in our website http://dev.psdgator.com/destinationskin/store-locator/
We get the following warning in all pages

Warning: you have included the Google Maps API multiple times on this page. This may cause unexpected errors.

and errors when using the simplemap plugin in http://dev.psdgator.com/destinationskin/store-locator/
After disabling the google maps plugin everything works great.

I would like to know if this is a known issue or if we could use a workaround , for example by disabling google maps plugin for that page only (maybe by modifying your plugin's code and by adding some conditionals).
Thanks in advance

  • Vladislav
    • Dead Eye Dev

    Hello,

    The latest Google Maps plugin release (v2.6.3, just released) will give in and not load the API library if it's already present, so this should resolve the conflict for you out of the box. However, loading the Google Maps API root library also means loading some extra dependencies from Google (e.g. Places and Panoramio support) which Simplemap doesn't load - this *may* mean reduced functionality for you, depending on the add-ons you have activated and rely on in our plugin. If this turns out to be the case, we can try and solve the issue the other way around - by forcing Simplemaps to use the API loaded from our plugin. To try doing it this way, adding this bit of code as a mu-plugin (or in your functions.php) should achieve this:

    function wdgm__fix_simplemap_conflict () {
    	wp_dequeue_script('simplemap-google-api');
    }
    add_action('template_redirect', 'wdgm__fix_simplemap_conflict', 99);
  • antony_papamichail
    • New Recruit

    Thank you very much!

    Your update fixed the conflict in all pages except the main page of the simplemap plugin. In this page there is still a conflict and if someones uses the simplemap filters the map breaks. The simplemap plugin uses ajax to filter the map.

    Your support is great and I know that I should seek support in the simplemap plugin's website but I would like to ask you one last question:

    Is there a way to disable your plugin in this specific page by dequeuing scripts perhaps, like you did in the proposed fix above? Could this be a temporary fix?

    Thanks again for everything!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.