Search code examples
javascriptgoogle-mapsgoogle-maps-api-3kmlkmz

Can't load KML Layer on Google Map


I created my Google Map loaded successfully an Google Map KML from Google Examples. But when I want to load my own kml file which I can open on Google Earth it doesn't load. I uploaded my kml file (11 MB) to my ftp, it is accessible. Is there any limits or should I convert it?

var ctaLayer = new google.maps.KmlLayer({
        url: 'http://blablabla.com/MyOwn.kml',
        //url: 'http://googlemaps.github.io/js-v2-samples/ggeoxml/cta.kml',
        suppressInfoWindows: true,
        map: map
    });

Solution

  • As it seems the KML-documentation has been modified.

    Previously there has been a list of limits, including a filesize-limit of 3MB for a single KML-File , but I can't find this list anymore.

    I've tested it and it's clear that now there is a limit of 2MB for a single KML-file.

    See also: https://code.google.com/p/gmaps-api-issues/issues/detail?id=9157