[Seaside] Site with google earth support using seaside

Philippe Marschall philippe.marschall at gmail.com
Sat Sep 15 06:36:06 UTC 2007


2007/9/14, Mariano Wahlmann <mariano at geoagris.com>:
> Philippe Marschall escribió:
> > 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.
> >
> >
> I have objects that renders kml (xml) into an stream, that's not my problem.
> >> - 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:.
> >
> >
> Yeah but i don't want any unautorized user to see our vehicles, because
> anybody could copy the correct parameters into the url and see any vehicle.

Then use some for of authentication like http basic authentication.

> Kml will be self refreshed every minute or so, so i don't care about
> session timeout.

Even if the user switches his computer off? Maybe I'm misunderstanding
you problem. Do you want the kml only to be valid for the current GE
session or a longer period like several weeks.

Cheers
Philippe

>
> bye 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