Conclusion
This solution works good for me (although I have not tested it roughly yet). I had problems when my layers were set to MS_DEFAULT in map file. I suppose this is because of legendtemplate part:
...
if (in_array($oLayer->name, $aLayers ))
{
if (!($oLayer->status == MS_DEFAULT))
{
$oLayer->set("status", MS_OFF);
}
}
...
NOTE: The solution does not currently work correctly with layers that have multiple classes.
Created by: dgambin last modification: Sunday 19 of February, 2006 [22:35:45 UTC] by dgambin
|