<div dir="ltr">Hello everyone, <br><br>I have a problem with PHP Mapscript. When I add or remove some metadatas, sometimes metadatas are removed without reasons. <br>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.<br>
<br>Is there an issue ?<br>Is this a known bug ?<br><br>I had to use a hack like this to avoid this problem :<br><br>// I save my metadata Description<br>$szLayer = $oLayer->getMetaData('DESCRIPTION');<br><br>// i remove metadatas<br>
if($oLayer->getMetaData('REPORT_BIRT') != '') {<br>$oLayer->removeMetaData('REPORT_BIRT');<br>}<br>if($oLayer->getMetaData('ID_BIRT') != '') {<br>$oLayer->removeMetaData('ID_BIRT');<br>
}<br>if($oLayer->getMetaData('OUTPUT_BIRT') != '') {<br>$oLayer->removeMetaData('OUTPUT_BIRT');<br>}<br><br>// i save metadata to avoid the strange remove that happens sometimes<br>$oLayer->setMetaData("DESCRIPTION", $szLayer);<br>
$oMap->save($szPathMap);<br><br>Thanks a lot<br><br></div>