[Mapserver-users] How to use REQUIRES in mapfile?
Steve Lime
steve.lime at dnr.state.mn.us
Fri Dec 19 10:45:47 PST 2003
That's a bug then. Could you file one that legends don't honor context?
Steve
>>> <nicolas.fortin at ec.gc.ca> 12/19/2003 8:01:43 AM >>>
Sorry...
I mean, this way I don't get error and it works. If I request each of those
two layers (by WMS by example) I only get one as I wish but both layers
diplay in the legend, not only the one on the map.
-----Message d'origine-----
De : Steve Lime [mailto:steve.lime at dnr.state.mn.us]
Envoyé : Thursday, December 18, 2003 6:01 PM
À : nicolas.fortin at ec.gc.ca; mapserver-users at lists.gis.umn.edu
Objet : Re: RE : RE : [Mapserver-users] How to use REQUIRES in mapfile?
Say that again? I'm not sure what you mean...
>>> <nicolas.fortin at ec.gc.ca> 12/18/2003 11:56:53 AM >>>
Thx Steve for your answer!
The layers now display correctly but even if one layer isn't there, the
legend appears. Is it normal?
Nicolas
-----Message d'origine-----
De : Steve Lime [mailto:steve.lime at dnr.state.mn.us]
Envoyé : Thursday, December 18, 2003 11:41 AM
À : nicolas.fortin at ec.gc.ca; mapserver-users at lists.gis.umn.edu
Objet : Re: RE : [Mapserver-users] How to use REQUIRES in mapfile?
I do. Requires allows you to control visibility based on other layers. For
example:
REQUIRES "![landsat]"
Means that a layer will be on only if the layer named landsat is not on. You
can also do and's and or's so this would work:
REQUIRES "![landsat] and![modis]"
There is a special tag called [raster] that allows you to control a layer
depending whether any raster layers are currently displayed. You might do
this to make a layer transparent in one context and opaque in another. So
this would be valid:
REQUIRES "![raster]"
That is, display if no background rasters are shown. Note that context is
checked only after a layer has already been made visible via MapScript or
the CGI.
Steve
>>> <nicolas.fortin at ec.gc.ca> 12/18/2003 9:56:41 AM >>>
No answer yet...nobody use this element??
-----Message d'origine-----
De : nicolas.fortin at ec.gc.ca [mailto:nicolas.fortin at ec.gc.ca]
Envoyé : Wednesday, December 17, 2003 3:20 PM
À : mapserver-users at lists.gis.umn.edu
Objet : [Mapserver-users] How to use REQUIRES in mapfile?
Hi list,
I have two layers using the same grid and I only want one of them on the map
at a time so I tried to use the REQUIRES element in my mapfile as seen in
the Mapfile Reference 4.0 (07-02-2003) : REQUIRES ([15] != 1) Where 15 is
the name of the layer using the same grid
And I got:
getString(): Symbol definition error. Parsing error near ([15] != 1):(line
94)
How can I use this element?
Thx,
Nicolas Fortin
Mathématicien, Programmeur, Analyste de données
SMC-Québec Hydrologie, Environnement Canada
1141, Rte de l'Église, Sainte-Foy(QC) G1V 4H5
(418)648-2516
nicolas.fortin at ec.gc.ca <mailto:nicolas.fortin at ec.gc.ca
<mailto:nicolas.fortin at ec.gc.ca> >
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list