Addition of kmllayer blocks out the map

When using the Google Maps API, I am having troubles adding the KML Layer.

Using the following javascript, the map renders fine.

Read More
  function initialize() {
    var mapOptions = {
      zoom: 8,
      center: new google.maps.LatLng(49.754,-115.834),
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };

var map = new google.maps.Map(document.getElementById('map_canvas'),
        mapOptions);

    //var ctaLayer = new google.maps.KmlLayer('http://forestcrowne.ca/earth/dave.kml');
    //ctaLayer.setMap(map);
    }

    google.maps.event.addDomListener(window, 'load', initialize);

When I uncomment the ctaLayer, the map disappears (yesterday it would render the kml file, but the map still disappeared). What is happening?

Take a look:
http://forestcrowne.ca/?page_id=1647 – with ctaLayer commented
http://forestcrowne.ca/?page_id=1668 – with ctaLayer uncommented

Related posts

Leave a Reply

2 comments

  1. The KmlLayer displays fine when not on your page. Try not using the “experimental/nightly build” version of the API, change:

    <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
    

    To call out a specific version (or v=3)

  2. So, thanks to all the help – I got it. I changed the background-color to transparent on the “Images in Posts”. Atahualpa has some fancy css to create radiused borders on images – one of the properties specified in background-color. So.. it was the css