[Geowanking] Re: animated kml?
Chris Holmes
cholmes at openplans.org
Thu Jul 12 12:14:09 PDT 2007
You can set the refresh params for the client on the server side.
We have a KML reflector in GeoServer, which lets you do a WMS request
without having to fill in all the variables, then we return the full WMS
request (outputting KML), but also the refresh params:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<NetworkLink>
<name>topp:states</name>
<open>1</open>
<Url>
<href>http://localhost:8080/geoserver/wms?service=WMS&request=GetMap&format=application/vnd.google-earth.kmz+XML&width=1024&height=1024&srs=EPSG:4326&layers=topp:states&styles=population&KMScore=30&KMAttr=true&legend=false&</href>
<viewRefreshMode>onStop</viewRefreshMode>
<viewRefreshTime>3</viewRefreshTime>
</Url>
</NetworkLink>
</kml>
These are view based refreshed. You could do time based ones just as
easily. There's a bit more info on what we've done at:
http://docs.codehaus.org/display/GEOSDOC/Google+Earth Next release
should have even more KML improvements.
Chris
Anselm Hook wrote:
> Ok sounds trivial. Maybe I'd have that server side scripting glue
> actually handle the request for the content (have it dynamically
> manufacture the content for the http request)... this would avoid
> possible collision over locking semantics; where the file was being
> written to while apache was trying to read it. This would also let me
> set the content-header so that the mime type was correct (as you
> mention).
>
> Then I'd post a link to that file on say my website and advise the
> user to set the refresh update rate... which seems not too onerous.
> To bad there's no way to just do it 'magically' where the user doesn't
> have to do anything more than just click on the link.
>
> - a
>
>
> On 7/12/07, Brent Fraser <bfraser at geoanalytic.com> wrote:
>> Aslem,
>>
>> Yes, but you'll need to create a "kml server". A simple
>> one (not intended for production!) is not very hard to make:
>>
>> 1. Install a web server application (Apache, IIS, etc)
>> on a server computer
>>
>> 2. Create a small program (e.g. using a C complier) to
>> build a kml file. This would re-create the file every so
>> often (e.g. once a minute) with updated coordinates. Put
>> the kml file in a place your web server can server it (eg
>> wwwroot, htdocs,...)
>>
>> 3. On the client compter, in Google Earth, do Add ->
>> Network Link, enter the URL of your KML file, select the
>> Refresh tab and select the Time-base Refresh to something
>> similar to the frequency your kml file is updated on the
>> server.
>>
>> Of course, the small program in Step 2 above could be (and
>> likely should be) some web server compatible scripting
>> language (Python, perl, PHP, ASP, etc) or CGI program
>> running within the web server.
>>
>> I can't recall if Google Earth is picky about the MIME type
>> the server sends. You may have to do some surfing re mime
>> types if Google Earth can't open the kml from your server...
>>
>> Brent Fraser
>> GeoAnalytic Inc.
>> Calgary, Alberta
>>
>> ----- Original Message -----
>> From: "Anselm Hook" <anselm at gmail.com>
>> To: <geowanking at lists.burri.to>
>> Sent: Thursday, July 12, 2007 12:23 PM
>> Subject: [Geowanking] Re: animated kml?
>>
>>
>> > Excellent, thanks,
>> >
>> >
>> http://missionarygeek.blogspot.com/2007/04/how-to-add-animated-maps-to-your.html
>>
>> >
>> > How about sequenced live ongoing animation over time; so
>> that a server
>> > is doling out new points of interest and camera angles and
>> the like
>> > without actually ever terminating the flow of traffic?
>> This might be
>> > akin to like streaming machinima or streaming radio.
>> >
>> > - a
>> >
>> >
>> > On 7/12/07, Anselm Hook <anselm at gmail.com> wrote:
>> > > Is it possible to say choreograph a sequence of camera
>> moves over time in
>> > > kml? Let's pretend I wanted to plot a whole pile of
>> points successively,
>> > > and I wanted to have the camera move over the planet and
>> show each of these
>> > > points as it was plotted.
>> > >
>> > > - a
>> > >
>> > >
>> > _______________________________________________
>> > Geowanking mailing list
>> > Geowanking at lists.burri.to
>> > http://lists.burri.to/mailman/listinfo/geowanking
>>
>>
> _______________________________________________
> Geowanking mailing list
> Geowanking at lists.burri.to
> http://lists.burri.to/mailman/listinfo/geowanking
>
> !DSPAM:4005,46967b44270155219720167!
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cholmes.vcf
Type: text/x-vcard
Size: 282 bytes
Desc: not available
URL: <http://geowanking.org/pipermail/geowanking_geowanking.org/attachments/20070712/6295c99d/attachment-0003.vcf>
More information about the Geowanking
mailing list