[Seaside] Site with google earth support using seaside

Philippe Marschall philippe.marschall at gmail.com
Fri Sep 14 04:32:00 UTC 2007


2007/9/14, Mariano Wahlmann <mariano at geoagris.com>:
> I have to do a site for tracking vehicles using google earth. The site
> work like this:
>
> - The user logins (a session start)
> - select what vehicle he wants to see
> - for the selected vehicle the site has to build on the fly a KML file
> (it's much like an XML with special tags)
> - the KML has to refresh itself agains the server (autorefresh, to
> update vehicle's position), the refresh tag it's like href="...."
> refreshInterval="...."
> - The user closes google earth, and then he logs out or the session
> expires (no more auto-refresh from GE).
>
> How can i implement this using Seaside, the problems i have are:
>
> - Rendering non html content, i've been using
>     self session returnResponse: ((Seaside.WAResponse new)
>                             contentType:
> 'application/vnd.google-earth.kml+xml';
>                             nextPutAll: stream contents;
>                             yourself)].
>     Is this the way, or there is another easier/cleaner way?

You just posted the simplest and least interesting part. The real
question is how build up th KML. Since KML "xml" and not just "xml
like" you could use your own canvas renderer. For some reason the code
that helps you generate all the methods was dropped so you'll have to
search it in the archives.

> - Include session url inside the content (to keep user session alive,
> and ensure that he's a validated user), in order to fill href="..." tag
> of KML content.

Including session id is a bad idea because they time out. Add the
neccasary informtion to the url, build a Seaside application that only
handles the kml requests and implement #initialRequest:.

Cheers
Philippe

> I'll appreciate any help!
>
> Thanks.
> Bye.
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


More information about the seaside mailing list