Automatic refresh of Google Earth

2,765 views
Skip to first unread message

Albert Steiner

unread,
Aug 16, 2010, 10:18:30 AM8/16/10
to KML Developer Support - Advanced Support for KML
Hi there

We am running an application, which automatically refreshes (reloads
kmz file) from a server. Until approx. mid/end June 2010 we never had
any problems. However, since then, for 3 to 5 time refreshing works
and afterwards fully stops.
Does anyone have an idea? Was there an update of GE around that time?
A known issue?

Any help is appreciated!!
Thanks, Albert

barryhunter (KML Guru)

unread,
Aug 16, 2010, 11:58:09 AM8/16/10
to KML Developer Support - Advanced Support for KML
Yes there was. 5.1 > 5.2

Other have reported similar issues.

Do you return 'blank' files sometimes, when there is no update to
send? I know how GE handles that has changed.

Albert Steiner

unread,
Aug 16, 2010, 12:07:32 PM8/16/10
to KML Developer Support - Advanced Support for KML
Thanks for the info. No, I calculate the whole stuff every ten
seconds. So even in the very rare case with no changes, a new file is
generated.
> > Thanks, Albert- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Albert Steiner

unread,
Aug 17, 2010, 4:23:08 AM8/17/10
to KML Developer Support - Advanced Support for KML
Hi again, would you recommend any alternative? Is Google aware of that
problem? For our application it would be really nice, if refreshing
would work again ;-)
Thanks, Albert

On 16 Aug., 17:58, barryhunter (KML Guru) wrote:

Grok Lobster

unread,
Aug 17, 2010, 11:25:54 AM8/17/10
to KML Developer Support - Advanced Support for KML
Your refreshing every 10 seconds might be the reason it doesn't work
anymore as that sounds like a realtime tracking app, which I am pretty
sure is against the terms of use.
> > - Zitierten Text anzeigen -- Hide quoted text -
>
> - Show quoted text -

Josh L

unread,
Aug 17, 2010, 11:49:30 AM8/17/10
to KML Developer Support - Advanced Support for KML
Hi Albert,

Can you provide a link to your application so we can try to see what
might be causing this issue?

Cheers,

-Josh

On Aug 17, 1:23 am, Albert Steiner wrote:

Albert Steiner

unread,
Aug 17, 2010, 12:46:30 PM8/17/10
to KML Developer Support - Advanced Support for KML
Hi Josh

Here is the link to the application: http://progreso.zhaw.ch/kml/AirTraffic3D.kmz

Thanks in advance!
Greetings, Albert

By the way:
Until approx. the end of June, I never had any refreshing problems.
> > > - Zitierten Text anzeigen -- Zitierten Text ausblenden -

Josh L

unread,
Aug 19, 2010, 1:06:21 PM8/19/10
to KML Developer Support - Advanced Support for KML
Hey Albert,

This looks like a caching issue. Since you are using Update without
any additional/unique parameters in the URL, Google Earth makes a
request for the same URL, and depending on your cache-control related
headers may just use the locally stored cache of the file if the
headers say that no update is needed.

To solve this you may wish to modify your response cache-header to
something like 'no-store', or use onExpire instead of onInterval and
set your max-age header appropriately.

Down the line, if you want to be able to scale to more complex
updates, you may wish to use an incremental update strategy, like the
one outlined at http://code.google.com/apis/kml/documentation/kml_21tutorial.html#updates

Cheers,

-Josh

Albert Steiner

unread,
Aug 20, 2010, 11:25:30 AM8/20/10
to KML Developer Support - Advanced Support for KML
Hi Josh

Thanks a lot for the update! As far as I understood, the cache-control
needs to be made on my server, right? Or is there a way to directly
control cache within my kml file? I would prefer the second option!
Another question: If I would use onExpire, this would mean, that I
always need to update the expiring date/time in the file?
As I am not a html/kml guru, it would be of great help, if you could
add some short info on how to best modify my original file or put in
here some brief example.

Many thanks in advance!!
Cheers, Albert



On 19 Aug., 19:06, Josh L wrote:
> Hey Albert,
>
> This looks like a caching issue.  Since you are using Update without
> any additional/unique parameters in the URL, Google Earth makes a
> request for the same URL, and depending on your cache-control related
> headers may just use the locally stored cache of the file if the
> headers say that no update is needed.
>
> To solve this you may wish to modify your response cache-header to
> something like 'no-store', or use onExpire instead of onInterval and
> set your max-age header appropriately.
>
> Down the line, if you want to be able to scale to more complex
> updates, you may wish to use an incremental update strategy, like the
> one outlined athttp://code.google.com/apis/kml/documentation/kml_21tutorial.html#upd...

mcahornsirup

unread,
Aug 20, 2010, 12:37:02 PM8/20/10
to KML Developer Support - Advanced Support for KML
Hi Grok,

why should this be against the terms of use? Can you provide some more
substantial details? The update feature is part of KML - and actually,
he is hitting his own server and not googles to generate the kmz file.
But maybe you can help clarifying this situation.

Kind Regards,

Steffen

Albert Steiner

unread,
Aug 20, 2010, 3:19:02 PM8/20/10
to KML Developer Support - Advanced Support for KML
Hi folks

Thanks for your comment, Steffen. Well, by the way, the application is
for research and eduction only, to demonstrate what nice things can be
done using GE. So nothing commerical anyway ;-)

A nice weekend, cheers
Albert
> > > - Show quoted text -- Zitierten Text ausblenden -

Josh L

unread,
Aug 23, 2010, 4:20:14 PM8/23/10
to KML Developer Support - Advanced Support for KML
Hi Albert,

I did a bit more research, and calling the standard refreshMode of
onInterval should do the trick by default even if your headers are not
necessarily specific as I suggested above. And in fact when I load
your page I do see updates taking place. I am unsure if perhaps you
changed something in the way you are creating your KML or not, but in
any case I am consistently seeing the updates take place.

That said, you may still be interested in the idea of the incremental
Update noted above for performance reasons if you ever want to scale
up to more data.

Cheers,

-Josh
Reply all
Reply to author
Forward
0 new messages