diff options
Diffstat (limited to 'httemplate/view/kml.cgi')
| -rw-r--r-- | httemplate/view/kml.cgi | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/httemplate/view/kml.cgi b/httemplate/view/kml.cgi new file mode 100644 index 000000000..7eaaa2a91 --- /dev/null +++ b/httemplate/view/kml.cgi @@ -0,0 +1,11 @@ +<% $kml->archive %>\ +<%init> + +my $kml = Geo::GoogleEarth::Pluggable->new; +$kml->Point( map { $_=>scalar($cgi->param($_)) } qw( name lat lon ) ); + +#http_header('Content-Type' => 'application/vnd.google-earth.kml+xml' ); #kml +http_header('Content-Type' => 'application/vnd.google-earth.kmz' ); #kmz +( my $name = $cgi->param('name') ) =~ s/[^a-z0-9]/_/g; #perhaps too restrictive +http_header('Content-Disposition' => "filename=$name.kmz" ); +</%init> |
