I'm very new with mapScript, I'm looking to change a layer order with mapScript. My ms_newMapObj is a merge of many mapfile so I don't know the index of the layer I want to move up.
I haven't find how to associate the layer with the drawing index given by getLayersDrawingOrder. This method returning only a list of index but what i realize, it's that the layer object haven't an index properties. I know the method moveLayerUp but it needs an index in parameter too.
Here is my code to get the layer I want to move up.
$allLayers = $oMapFinal->getAllLayerNames();foreach ($allLayers as $evalLayer){ $layer = $oMapFinal->getLayerByName($evalLayer); if($layer == MY CONDITION) //change drawing order
أكثر...
I haven't find how to associate the layer with the drawing index given by getLayersDrawingOrder. This method returning only a list of index but what i realize, it's that the layer object haven't an index properties. I know the method moveLayerUp but it needs an index in parameter too.
Here is my code to get the layer I want to move up.
$allLayers = $oMapFinal->getAllLayerNames();foreach ($allLayers as $evalLayer){ $layer = $oMapFinal->getLayerByName($evalLayer); if($layer == MY CONDITION) //change drawing order
أكثر...