Jesus Loves GRASS

Technical blog about GRASS/GIS,open source geoinformatics and MAPSERVER.

Sunday, April 15, 2007

Fetching Metadata

THe metadata contained in the MAP file is fetched at init.php and based on the programming already there:

$download = "false";
if ($oLayer->getMetaData ("download") !="") {
if(strcasecmp($oLayer->getMetaData("download"), "true") == 0)
$download = "true";
}

This will get the metadata from dowload in the MAP file and pass the value to the $download variable of PHP, as default the $download is false

Then the $download is integrated in the layer as another property:

$szLayers .= "map.addLayer(new _layer( { ".
"name:'".$groupName."',".
"visible:".$status.",".
"opacity:".$opacity.",".
"imageformat:'".$imageformat."',".
"queryable:".$szQueryable.",".
"download:".$download.",".
"tileSource:'".$tileSource."',".
"redrawInterval:".$redrawInterval.",".
"refreshInterval:".$refreshInterval.",".
"scales: new Array('".implode("','",$groupScaleVis)."')}));";

The line in bold was added to the properties of the layer

Labels: , ,

0 Comments:

Post a Comment

<< Home