can layers be linked?
Pietro Giannini
pgiannini at BYTEWISE.IT
Mon Jun 18 06:18:06 PDT 2007
Another way can be the REQUIRES "condition" in the layer section of the
.map file
(http://mapserver.gis.umn.edu/docs/reference/mapfile/layer).
REQUIRES allow the layer's display only if the condition is true.
The map will be so:
LAYER
NAME point
....
END
LAYER
NAME line
STATUS default # <---------- status default: the layer is ever visible
REQUIRES "[point]" # <------ but only if layer "point" is visible too
....
END
ciao
.............................pg
Pietro Giannini
Bytewise srl - Area GIS
41°50'38.58"N 12°29'13.39"E
> Hi Nelson,
>
> You can use the GROUP attribute for each layer, setting it to the same
> value (ex : GROUP "COMPOSITE")
> they'll not be linked, but you'll be able to retrieve thse layers using
> the group name :
> $aLayers = $pMap->getLayersIndexByGroup("COMPOSITE")
> and then loop on the $aLayers array to switch then on/off
>
> Regards,
>
> Guillaume SUEUR
>
>
> LITTLE Nelson a écrit :
>> Hi,
>>
>>
>>
>> I would like to link two layers of different geometry types. 1 layer
>> contains points, the other layer contains lines. The points and lines
>> are shown together to display a composite object on a map. If the user
>> no longer wants to see that composite object on the map then I would
>> like to turn off both of the layers. I am sure I can do it
>> programmatically, but I would like to know if they can be linked in the
>> MapFile?
>>
>>
>>
>> Thanks,
>>
>> Nelson
>>
>
> --
>
> Guillaume SUEUR
>
More information about the MapServer-users
mailing list