[mapserver-users] Bug generating new Outputformat with PHPMapscript
    Nicol Hermann 
    mapserver at geoworld.de
       
    Wed Jan 29 12:50:58 PST 2020
    
    
  
Hello,
I am facing a problem to generate a new output format with PHP
Mapscript (Mapserver 7.4.3, PHP 7.3)
The following code: 
$map = ms_newMapObj('') or die('Unable to open mapfile.');
$geoJsonOutputFormat= new outputFormatObj('OGR/GEOJSON', 'geojson' );
$geoJsonOutputFormat -> setOption("mimetype", "application/json;
subtype=geojson");
$geoJsonOutputFormat -> setOption("FORMATOPTION", "STORAGE=stream");
$geoJsonOutputFormat -> setOption("FORMATOPTION", "FORM=SIMPLE");
$map->appendOutputFormat($geoJsonOutputFormat);
$layer = ms_newLayerObj($map);
$poClass = ms_newClassObj($layer);
$styleObj = ms_newStyleObj($poClass);
$status= $map->save( '/tmp/testmap.map');
produces this outputformat:
OUTPUTFORMAT
    NAME "geojson"
    DRIVER "OGR/GEOJSON"
    IMAGEMODE FEATURE
    TRANSPARENT FALSE
    FORMATOPTION "MIMETYPE application/json; subtype=geojson="
    FORMATOPTION "FORMATOPTION=FORM=SIMPLE"
END # OUTPUTFORMAT
The 'mimetype' and 'formatoption' are not recognized properly.
Only one 'formatoption' from the specified once are "somehow"
recognized.
Is this a bug or something I am doing wrong?
Thanks for any help
Nicol
    
    
More information about the MapServer-users
mailing list