getLayers(); $groupDescription = $group->getDescription(); // the first metadata information found : foreach ($glayerList as $glayer) { $mapLayer = $map->getLayerByName($glayer->getLayerName()); if ($mapLayer) { $metadataValue = $mapLayer->getMetadata($metadataName); } if ($metadataValue) break; } // if no description if (!$metadataValue) { $metadataValue = $groupDescription ? $groupDescription : $groupName; } $inString = $metadataValue; $map2unicode = $_SESSION["map2unicode"]; // code extract from pmapper core sources : "incphp/initgroups.php", function "mapStringEncode" if ($map2unicode) { $mapfile_encoding = trim($map->getMetaData("MAPFILE_ENCODING")); if ($mapfile_encoding) { if ($mapfile_encoding != "UTF-8") { $outString = iconv($mapfile_encoding, "UTF-8", $inString); } else { $outString = $inString; } } else { $outString = utf8_encode($inString); } } else { $outString = $inString; } $metadataValue = $outString; $metadataValue = _p($metadataValue); header("Content-type: text/html; charset=$defCharset"); ?>