Thanks for the response Derek. I'm now setting Content-Type to what google prefers it to be set as but it's still not fixing the problem for me. Is Jetty or lift set to block google for any reason? Here's a copy of what I posted to the kml developer support group:
Hello guys, I'm at my wits end trying to view my kml in google maps. I can view static kml from my webserver: http://maps.google.com/maps?q=http://thenang.ebiggs.com/abc.kml but not dynamically generated kml: http://maps.google.com/maps?q=http://thenang.ebiggs.com/kml/5/abc.kml the generated files are identical and function fine in Google Earth: static: http://thenang.ebiggs.com/abc.kml dynamic: http://thenang.ebiggs.com/kml/5/abc.kml and it seems like the http headers are in order though not entirely identical, in fact, my dynamic header seems to be better with the proper Content-Type set: static: http://web-sniffer.net/?url=http://thenang.ebiggs.com/abc.kml dynamic: http://web-sniffer.net/?url=http://thenang.ebiggs.com/kml/5/abc.kml I really have no idea what could be going on here. The error Google gives just says it can't find the file... it makes me wonder if my webserver blocks google for certain requests though with web- sniffer.net if I set it to google-bot it's not blocked. Anybody have any ideas here? Many thanks On Oct 19, 7:10 am, "Derek Chen-Becker" <[EMAIL PROTECTED]> wrote: > Google maps doesn't work with XHTML, so you have to tweak the Content-Type > header using LiftRules.*determineContentType* from your Boot class*. *It > takes a partial function so that you can make it specific to a single page: > > LiftRules.determineContentType = { > case (Full(RequestState("view" :: "map" :: Nil, _, _), _)) => "text/html" > // I think this should work > > } orElse LiftRules.determineContentType > > or you can override it for your whole app: > > LiftRules.determineContentType = { > case _ => "text/html" > > } > > Derek > > On Sun, Oct 19, 2008 at 1:11 AM, tacobandit <[EMAIL PROTECTED]> wrote: > > > Hey guys, I'm trying to put together some dynamic KML, and google maps > > doesn't seem to be happy with it. I'm wondering if it's because of the > > MIME type of my response. Is it easy to set this or other http header > > fields for any given http response? > > > I'm pretty new to lift and scala and am loving them so far... > > > Appreciate any help... otherwise I might have to start digging through > > the source code. My scala reading skills are slow still... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
