Commit 036bc250270e09686c621272b8c4642b22c8c5db

Authored by Edmar Moretti
1 parent 24c6f03f

--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 44 DRIVER 'OGR/KML'
45 45 MIMETYPE "application/vnd.google-earth.kml+xml"
46 46 #FORMATOPTION "STORAGE=memory"
47   - #IMAGEMODE FEATURE
48   - END
  47 + IMAGEMODE FEATURE
  48 + END
49 49 OUTPUTFORMAT
50 50 NAME "geojson"
51 51 DRIVER "OGR/GEOJSON"
... ...
ogc.php
... ... @@ -819,10 +819,12 @@ if(isset($OUTPUTFORMAT)){
819 819 $l = $oMap->getlayer(0);
820 820 $n = $l->name."-kml";
821 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 824 $l->setmetadata("wfs_getfeature_formatlist","kml");
825 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 829 //FIXME envia uma linha estranha no header. Nao da pra usar
828 830 if(strtolower($OUTPUTFORMAT) == "geojson"){
... ...