I have a .kml file (buffer.kml) that is constantly being rewritten by
a server process every 40 seconds with new information.
I have established a networkLink to this .kml inside a function
called
kmlLOADPoint() which I call in the initCB() function.
The map will load the .kml initially and will continue to update when
the .kml file updates but only a handful of times. Eventually it
stops
reflecting the changes in the .kml file. Even when I go in and change
values around in the .kml file the map does not reflect the changes.
This has only started happening after the recent update on sept 9th:
http://groups.google.com/group/google-earth-api-notify/browse_thread/...
Here is my code:
<script type="text/javascript">
var ge;
google.load("earth", "1");
function init() {
google.earth.createInstance('map3d', initCB, failureCB);
}
function initCB(instance) {
ge = instance;
ge.getWindow().setVisibility(true);
kmlLOADPoint();
}
function failureCB(errorCode) {
}
google.setOnLoadCallback(init);
function kmlLOADPoint() {
nl = null;
nl = ge.createNetworkLink("");
nl.setFlyToView(false);
var link = ge.createLink("");
link.setHref("
http://65.68.82.97/users/<%=
user.identity.name %>/
buffer.kml?nocacher=" + (new Date()).getUTCSeconds());
link.setRefreshMode(1);
link.setRefreshInterval(5);
nl.setLink(link);
ge.getGlobe().getFeatures().appendChild(nl);
}
</script>
I have found other's also complaining of the same anomaly:
http://groups.google.com/group/kml-support-getting-started/browse_thread/thread/7eed44d377a294e0/34dd565881778c61?q=%22NetworkLink+fails%22+OR+%22fails+to%22+OR+%22to+refresh%22+OR+%22refresh+map%22&lnk=sbp#34dd565881778c6
Upon testing, I have noticed that the problem doesn't occur on
smaller .kml files. The buffer.kml file size can range between 500kb
to 2mb, is this too big for a .kml to be in order for it to refresh
reliably? Has anyone else experienced issues since the update along
these lines? I would be EXTREMELY appreciative of any support or
suggestions.
I have also noticed that google chrome seems to be immune from this
bug.
[if this post seems familiar, I posted it before and took it down
because I thought I had correct the problem only to find out that I
was wrong.]