Hi Stephen,
I added the [event_map] short-code to a new page and the map shows, but not always. Half of the times it loads the other not. When debugging in IE 11.09 I get the following:
You have included the Google Maps API multiple times on this page.
This may cause unexpected errors.
Looking at the source these are the relevant lines:
<link rel='stylesheet' id='open-sans-css' href='//fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=4.1.1' type='text/css' media='all'/>
...
<link rel='stylesheet' id='listify-fonts-css' href='//fonts.googleapis.com/css?family=Montserrat%3A400%2C700&subset=latin%2Clatin-ext&ver=4.1.1' type='text/css' media='all'/>
...
<script type='text/javascript' src='//maps.googleapis.com/maps/api/js?v=3&libraries=geometry%2Cplaces&key&language=en®ion=us&ver=4.1.1'></script>
...
<div class='eo-venue-map googlemap' id='eo_venue_map-1' style='height:200px;width:100%;'></div>
...
<script type='text/javascript' src='http://maps.googleapis.com/maps/api/js?sensor=false&callback=eo_load_map&language=en&ver=4.1.1'></script>
Could you please help me find the problem?
Note that the mobile version loads it every time without issues.
Thanks
Vlad
Vladislav Gherciu
Found the cause, Listify theme is loading an extra map.
This would explain the fact that the EO map is not showing but doesnt explain why it is showing sometimes. o.O
Is it a browser thing?
Vladislav Gherciu
Hi Vladislav,
I believe it causes a problem in some browsers. Do some browsers show the map inconsistently? (i.e. sometimes they don’t, and sometimes they do – that would be unusual.)
Ultimately the issue is that Google maps is loaded twice. If you’re trying to display two maps on the same page (from two different plug-ins) then there’s not much that can be done. However, if the theme is loading the script, but not displaying a map, then this is a bug with the theme.
Stephen Harris
It is showing it inconsistently, regardless of the browser (tested on FF, Chrome, IE) same results. Mobile version though shows the map consistently, could it be that mobile browsers drop these conflicts?
In any case, I took it to “listify” devs to check why the script is not removed once the map is disabled, which is causing the issue.
I manually removed them from the templates, but this is only a temporary solution.
Thanks Stephen,
Vlad
Vladislav Gherciu
Also this is not a bug ^.^
Vladislav Gherciu
Hopefully they’ll get back to you.But I’m glad to hear this is resolvable in the short term at least. (Although generally harmless I would consider any loading of unrequired assets as being a bug 😉 )
Stephen Harris
Indeed, not a bug in EO that is ^.^
So that folks are not confused when looking at this thread
Vladislav Gherciu