I am trying to add a couple of KML layers to a map. This is the code I have:
var myKmlOptions = { preserveViewport: true, suppressInfoWindows: true } var kmlLayer_1 = new google.maps.KmlLayer("Layers/layer1.kml", myKmlOptions); var kmlLayer_2 = new google.maps.KmlLayer("Layers/layer2.kml", myKmlOptions); kmlLayer_1.setMap(map); kmlLayer_2.setMap(map);
Something definitely works, because if I change saveViewport to false, the map approaches the area defined by the KML layer.
But nothing appears, its layer itself is missing: /
Any ideas?
source share