Commit 036bc250270e09686c621272b8c4642b22c8c5db
1 parent
24c6f03f
Exists in
master
and in
7 other branches
--no commit message
Showing
2 changed files
with
6 additions
and
4 deletions
Show diff stats
aplicmap/ogcwsv6.map
@@ -44,8 +44,8 @@ MAP | @@ -44,8 +44,8 @@ MAP | ||
44 | DRIVER 'OGR/KML' | 44 | DRIVER 'OGR/KML' |
45 | MIMETYPE "application/vnd.google-earth.kml+xml" | 45 | MIMETYPE "application/vnd.google-earth.kml+xml" |
46 | #FORMATOPTION "STORAGE=memory" | 46 | #FORMATOPTION "STORAGE=memory" |
47 | - #IMAGEMODE FEATURE | ||
48 | - END | 47 | + IMAGEMODE FEATURE |
48 | + END | ||
49 | OUTPUTFORMAT | 49 | OUTPUTFORMAT |
50 | NAME "geojson" | 50 | NAME "geojson" |
51 | DRIVER "OGR/GEOJSON" | 51 | DRIVER "OGR/GEOJSON" |
ogc.php
@@ -819,10 +819,12 @@ if(isset($OUTPUTFORMAT)){ | @@ -819,10 +819,12 @@ if(isset($OUTPUTFORMAT)){ | ||
819 | $l = $oMap->getlayer(0); | 819 | $l = $oMap->getlayer(0); |
820 | $n = $l->name."-kml"; | 820 | $n = $l->name."-kml"; |
821 | $oMap->selectOutputFormat("kml"); | 821 | $oMap->selectOutputFormat("kml"); |
822 | - //$oMap->outputformat->setOption("STORAGE", "memory"); | ||
823 | - //$oMap->outputformat->setOption("FILENAME", $n.".kml"); | 822 | + $oMap->outputformat->setOption("STORAGE", "memory"); |
823 | + $oMap->outputformat->setOption("FILENAME", $n.".kml"); | ||
824 | $l->setmetadata("wfs_getfeature_formatlist","kml"); | 824 | $l->setmetadata("wfs_getfeature_formatlist","kml"); |
825 | $oMap->save($nomeMapfileTmp); | 825 | $oMap->save($nomeMapfileTmp); |
826 | + header('Content-Disposition: attachment; filename='.$n.'.kml'); | ||
827 | + header("Content-type: application/vnd.google-earth.kml+xml"); | ||
826 | } | 828 | } |
827 | //FIXME envia uma linha estranha no header. Nao da pra usar | 829 | //FIXME envia uma linha estranha no header. Nao da pra usar |
828 | if(strtolower($OUTPUTFORMAT) == "geojson"){ | 830 | if(strtolower($OUTPUTFORMAT) == "geojson"){ |