Well as the title suggests, I have implemeted a very SIMPLE google maps into my wordpress page.
I stripped it down as much as possible to the following in the head:
<style>
#map-canvas {
height: 700px;
width: 700px;
}
</style>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
<script>
var map;
function initialize() {
map = new google.maps.Map(document.getElementById('map-canvas'), {
zoom: 8,
center: {lat: -34.397, lng: 150.644}
});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
I have a div id='map-canvas' in the body.
The code is correct as I have ran it with jsfiddle: https://jsfiddle.net/oLyz8ge0/
The temp web page with the code on my wordpress site is located here: http://www.worldheritagetrip.com/unesco-world-heritage-list/
I have spent days and days trying to figure this out.
The major issue is the problem is INTERMITTENT !!
So if you go to the page it may load the first, click refresh - it may load, it may not. It is completely random.
When I started the webpage I was a newbie and fiddeled around a lot with JS and installed MANY wordpress plugins. since then I have refined my JS skills and think 'i know what I am doing' now. However, I fear that somewhere in my tinkering I screwed something up - I don't know. It doesn't explain the randomness though.
ALSO: I found in chrome and firefox the problem is the worst - surprisingly on my iPphone (chrome and safari) it loads everytime! and in IE (WTF?)!!
Can someone help me out here?