Search code examples
google-mapsgoogle-maps-api-2

Google Maps - Adsense ads not showing in Internet Explorer


I am trying to display adsense ads on maps, but internet explorer gives me a hard time once again. The ads show on all other browsers I tried (chrome, ff, safari, opeara) but internet explorer. Has anyone encountered this before? here is my code for the admanager:

var publisherID = 'ca-pub-6630823543717184';

var adsManagerOptions = {
maxAdsOnMap : 1,
style: 'adunit',
channel: '5611474977'
};
adsManager = new GAdsManager(map, publisherID, adsManagerOptions);
adsManager.enable();

I am using xhtml1-strict doctype


Solution

  • I have found a solution to this. You have to declare the script version as v=2.x whereas I had v=2

    correct way:

    <script src="http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=YOUR_KEY_HERE&amp;sensor=false"
    type="text/javascript"></script>
    

    I had

    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=YOUR_KEY_HERE&amp;sensor=false"
        type="text/javascript"></script>
    

    this small ommission was causing IE not to display google ads on my maps. Problem solved!