the following code (below) saved as .asp launches google earth and zooms to the specified coordinates BUT only seems to work if pasted directly into the URL address bar. The idea is to be able to link to the file using <a href="kml.asp">klm link</a> however this does not seem to work any ideas? thank you mo <%@ Language="VBScript" %> <% Option Explicit %> <% Response.Clear Response.ContentType="application/vnd.google-earth.kml+xml kml" Response.AddHeader "Content-Disposition", "inline; filename=log_test.kml" Response.Write "<?xml version=""1.0"" encoding=""UTF-8""?>" Response.Write "<kml xmlns=""http://earth.google.com/kml/2.0"">" Response.Write "<Placemark>" Response.Write "<name>" & Now & "</name>" Response.Write "<Point>" Response.Write "<coordinates>-0.221521253413915,59.5982541259184,0</coordinates>" Response.Write "</Point>" Response.Write "</Placemark>" Response.Write "</kml>" %> Code (markup):
Apologies, this code does work as a link. For all interested, this mime type line 6 works for opening kml files thanks mo
hello, The above code worked great, but what I'm trying to do is list several places at once. I keep getting a GE error that says only one allowed under root. I just repeated the code between the placemark tags. I'm pretty new to KML so sorry if this is basic. But any ideas?