Reputation: 768
I m facing an odd problem in google maps. I have a 3 mb file(lates_compartment.kml) of kml data. when i try to showing this on google map it is not showing. /*Here is the code */
var compartmentLayer = new google.maps.KmlLayer({
url: 'http://69.60.115.13/mforest/PORMap/lates_compartment.kml'
});
compartmentLayer.setMap(map);
but showing properly for another kml file(din_Nagpur.kml) (365 kb).
var nagpurLayer = new google.maps.KmlLayer({
url: 'http://69.60.115.13/mforest/PORMap/din_Nagpur.kml'
});
nagpurLayer.setMap(map);
It seems that google map API has issues with large kml files. Please guys help me.
Thanks
Upvotes: 1
Views: 1140
Reputation: 76395
You might want to check this page on the size and complexity limits. 3MB is the upper limit for a raw kml file, so you're right on the limit. Try to see if your file isn't 3.01Mb in size or something, and try to compress it, see if that helps.
Just zip the KML file, and change the .zip
extension to .kmz
, that should make a difference in size.
There's also a layer-limit, that stops any output from being rendered once reached, though I've tried stacking about 15 layers without any problem, so I don't suppose that's likely going to be the issue here
But again, check the link, it's all there...
Upvotes: 3