Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I optimize the loading time of Google Earth Web Plugin if I have a very large KML file?
    text
    copied!<p>My client has a very large KML file, it contains around 6000+ placemarks and these placemarks have to appear as 3D models on the map. What's even worse is that the KML file does not contain that <code>&lt;link&gt;</code> tag for the COLLADA file, which means I have to traverse the KML file and attach a COLLADA file before it can be displayed on google earth. Now I can already traverse and add a 3D model for each placemark. I tested it with a very small KML file(which contains like less than 100 placemarks) and it worked great as expected...but when I used the very large KML file which had like 6000+ placemarks on it, the plugin just crashes and I am advised to refresh the browser, only to find it crashing again... :(</p> <p>Any advice on this? Is there a limit to the number of placemarks I can put on google earth web plugin? How do I make the loading faster?</p> <pre><code>function render3DPoles(polesKmlLink){ google.earth.fetchKml(ge,polesKmlLink, function(object){ if(object){ var item = object.getFeatures().getChildNodes().item(0); var folder = item.getFeatures().getChildNodes(); var latitude; var longitude; for(var i = 0; i&lt;folder.getLength(); i++){ var placemark = folder.item(i); latitude = placemark.getGeometry().getLatitude(); longitude = placemark.getGeometry().getLongitude(); var model = ge.createModel(''); var location = ge.createLocation(''); model.setLocation(location); var link = ge.createLink(''); link.setHref('insert URL of collada file here'); model.setLink(link); location.setLatitude(latitude); location.setLongitude(longitude); model.setLocation(location); placemark.setGeometry(model); ge.getFeatures().appendChild(placemark); } var la = ge.createLookAt(''); la.set(latitude,longitude, 25, ge.ALTITUDE_RELATIVE_TO_GROUND,180, 60, 100); ge.getView().setAbstractView(la); } else { setTimeout(function() { alert('Bad or null KML.'); },0); } }); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload