[Seaside] Site with google earth support using seaside
mariano at geoagris.com
Fri Sep 14 20:54:25 UTC 2007
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="...."
>> - 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)
>> nextPutAll: stream contents;
>> 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.
Kml will be self refreshed every minute or so, so i don't care about
More information about the seaside