Skip to content Skip to sidebar Skip to footer

How To Add Dynamic Kml To Google Earth?

We are trying to add dynamic kml to google earth.But we are failing in one situation. CODE: var currentKmlObject = null; function loadkmlGE(){ if (currentKmlObject != null) {

Solution 1:

fetchKml I beleive uses the browser to fetch the file. It will generally cache the file unless told otherwise.

You could arrange for the server to tell the browser it cant cache the file - using HTTP headers. depends on your server how to set that up.

... or just arrange the url to change each time.

var url = 'test.kml?rnd='+Math.random();

or similar. The server will likly ignore the bogus param. But as the URL has changed the browser wont have a cached version.

Post a Comment for "How To Add Dynamic Kml To Google Earth?"