diff options
author | ivan <ivan> | 2011-12-22 01:52:03 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-12-22 01:52:03 +0000 |
commit | 26369646df778a72a101c244e08d91e8a106b90e (patch) | |
tree | 368909794e2ea21f4ac85035523dad098dff4005 | |
parent | b8a34a689564a6456509983e7ccd8c91298a11e5 (diff) |
google earth links should now show a filename of customer_name.kmz, RT#15539
-rw-r--r-- | httemplate/view/kml.cgi | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/httemplate/view/kml.cgi b/httemplate/view/kml.cgi index 47435c74a..7eaaa2a91 100644 --- a/httemplate/view/kml.cgi +++ b/httemplate/view/kml.cgi @@ -1,13 +1,11 @@ <% $kml->archive %>\ <%init> -my ($latitude, $longitude, $name) = @_; -#would be nice to pass in customer or prospect name too... - 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> |