Reputation: 23
I need to load many more kml files like this. How can i do so?
<script>
var map;
var src = 'https://sites.google.com/site/pdbkml/pdbmap/pdb.kmz';
Or is there any way to merge multiple kmls into one?
Upvotes: 1
Views: 3322
Reputation: 1
There is a limit of about 20 kml layers you can display depending upon the length of the URL to each KML file. If you exceed the limit no kml files will display and you get a js error
Upvotes: 0
Reputation: 133370
You can use more kmlLayer
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 11,
center: {lat: 45.1, lng: 12.1}
});
var kmlLayer1 = new google.maps.KmlLayer({
url: 'http://your_domain/your_path/yourkml1.kml',
map: map
});
var kmlLayer2 = new google.maps.KmlLayer({
url: 'http://your_domain/your_path/yourkml2.kml',
map: map
});
var kmlLayer3 = new google.maps.KmlLayer({
url: 'http://your_domain/your_path/yourkml3.kml',
map: map
});
}
</script>
Upvotes: 3