Search code examples
javasessionservletskmlgoogle-earth

How do I maintain session state with a Google Earth client?


I'm playing with dynamic updates to Google Earth KML files.

The updates are of the form

<kml...>
  <NetworkLinkControl>
    <Update>
      <targetHref="...">
      <Change>
        <Placemark targetId="...">
        ...stuff to update...
        </Placemark>
      </Change>
    </Update>
  </NetworkLinkControl>
</kml>

And it all works greatm from my Java Servlet - except that GE doesn't seem to support HTTP Sessions, and I need to provide only the updates that have occurred since the last request from a given client.

Am I doing something wrong? Does GE support sessions and I'm too stupid to work out how? If I need to provide client-specific updates without sessions, how can I do that? (I know I could use the source IP address as a coarse measure but that feels kinda nasty...)

Thanks!


Solution

  • Old question, but you need to encode the session ID as part of the URLs. GE does not maintain cookies.