404 Error

228 views
Skip to first unread message

John Horstkamp

unread,
Jan 13, 2012, 3:23:21 PM1/13/12
to KML Developer Support - KML Server Side Scripting
Hello, I'm very new to Google Earth and KML/KMZ in general so sorry
for what may be a newb question but I can't find an answer for this in
the group:

We have an app that generates a kml/kmz file. This file is linked to
via network link.
The kml/kmz is updated every n seconds (it is rewritten from a staging
folder).

The network link is configured to update every m seconds.

Occasionally, Google Earth tries to access the kml/kmz file while it
is being updated, causing an HTTP 404 error.

We can clear the error by manually right-clicking on the problem file
(in the Google Earth tree view) and refreshing, but would like to know
if there is a way to set some type of network retry count in Google
Earth?

Google Earth v6.1.0.5001, Build Date 10/17/2011

(Note: I tried using OnChange, which seemed like a good idea, but
there are "undesirable side-effects"...)

Thanks,

John






Jason M

unread,
Sep 22, 2012, 2:50:38 PM9/22/12
to kml-support-serv...@googlegroups.com
Hi.

Instead of writing to the target flie (assuming the KML/KMZ is rather large) try writing to a temp file and when done delete the old .kmz and rename the temp file to the target KMZ file.

The old KMZ file is still accessed only until the new file is completely written do you replace it.

This way you minimize the time you can get a 404 not found to few milliseconds while you do the switch over.

See if this makes the 404 errors go away.

--jason
Reply all
Reply to author
Forward
0 new messages