Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

invoking Google Earth from a Servlet

 
William Stafford
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For our Servlet-based application we need to build a kml file and start Google Earth from a Servlet.

I know how to generate the kml file but I'm not sure of how to:

1. start Google Earth from a Servlet. Has anyone done this?

2. manage the temporary kml files. Is there a way to give files a limited lifetime or is there a Java file cleanup 'utility' that can be part of a servlet based application?

Thanks for any help or advice,

-=beeky
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While I'm sure that it's possible to start Google Earth from a servlet (using Runtime.exec or ProcessBuilder), what are you trying to achieve by doing so? Who would see or use it on the server?

Or do you mean you want to stream the KML file to the client and have Google Earth start there? If so, here's some information on KML MIME types: http://code.google.com/apis/kml/documentation/kml_tut.html#kml_server
 
William Stafford
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf,
Thanks for the reply. At this point I'm not completely sure what I want to do but as you said "... stream the KML to the client and have Google Earth start there" seems like the best solution for the requirements of this feature.

Previously we just allowed a download of the KML file but the decision makers have decided that a better solution would be to have a link that results in Google Earth starting on the client and displaying the KML file constructed by the Servlet.

Thanks again for the informative reply,
-=beeky
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic