[mapserver-dev] Problem with metadata

Tommy Roughol nerkeilenemon at gmail.com
Wed Sep 3 09:50:25 EDT 2008


Hello everyone,

I have a problem with PHP Mapscript. When I add or remove some metadatas,
sometimes metadatas are removed without reasons.
For instance, I have a metadata "description", and when I do
"$oLayer->removeMetaData('toto');"or "$oLayer->setMetaData('toto',
'titi');", the metadata description is deleted, but not always, sometimes.

Is there an issue ?
Is this a known bug ?

I had to use a hack like this to avoid this problem :

// I save my metadata Description
$szLayer = $oLayer->getMetaData('DESCRIPTION');

// i remove metadatas
if($oLayer->getMetaData('REPORT_BIRT') != '') {
$oLayer->removeMetaData('REPORT_BIRT');
}
if($oLayer->getMetaData('ID_BIRT') != '') {
$oLayer->removeMetaData('ID_BIRT');
}
if($oLayer->getMetaData('OUTPUT_BIRT') != '') {
$oLayer->removeMetaData('OUTPUT_BIRT');
}

// i save metadata to avoid the strange remove that happens sometimes
$oLayer->setMetaData("DESCRIPTION", $szLayer);
$oMap->save($szPathMap);

Thanks a lot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20080903/06e0241c/attachment.html


More information about the mapserver-dev mailing list