[mapserver-dev] A thought about a CGI parameter add, basically a switch for turning a default layer off.

Stephen Woodbridge woodbri at swoodbridge.com
Wed Feb 2 00:29:59 EST 2011


I do not think this would be a good idea because it would allow a user 
to turn off say a copyright layer for instance.

I think it is better to plan out your application to turn things on that 
you want on as Steve suggests.

So while I do you the CGI even in OpenLayers over the WMS, mostly 
because I learned it first and partly because WMS just makes it too easy 
for unwanted users to pull maps, I am somewhat inclined to think the WMS 
is the better way to go if you want all the capabilities of WMS. What is 
your rationale for adding a all this stuff to the CGI? Does working it 
through the template system meet your needs?

Inquiring minds want to know :)

Best regards,
   -Steve W

On 2/1/2011 10:54 PM, Lime, Steve D (DNR) wrote:
> 1) If your interface is smart enough to explicitly turn the
> centerlines off why wouldn't you just set STATUS OFF in the mapfile
> and explicitly turn them on? I think the REQUIRES parameter is a
> better means of triggering this auto-off capability in any regard.
>
> 2) You might already be able to do the layer list using the
> [toggle_layers] tag. It returns a space delimited list of layers that
> can be toggled. It's available in any query/browse template so I
> imagine you could craft a URL that runs quickly to access them that
> way... Just a thought.
>
> Steve ________________________________________ From:
> mapserver-dev-bounces at lists.osgeo.org
> [mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Bob Basques
> [Bob.Basques at ci.stpaul.mn.us] Sent: Tuesday, February 01, 2011 2:43
> PM To: MapServer Dev Mailing List Subject: [mapserver-dev] A thought
> about a CGI parameter add,   basically a switch for turning a default
> layer off.
>
> All,
>
>
> Is this doable?
>
>
> Was wondering about a mechanism to turn a DEFAULT layer off via CGI,
> something like "layers=-centerlines", where the negative sign ( - )
> would be used to indicate that a default layer should NOT be drawn
> for a CGI request.
>
>
> In short terms, could adding a negative sign ( - ) to the front of a
> layer name to NOT draw that layer be easily implemented in the CGI
> calls?
>
>
> WARNING:  If the above is possible, the next question would be to get
> a list of the layers that are available in a MAPFILE (like
> GetCapabilities) for drawing.  And don't say use WMS, otherwise you
> should get rid of the LEGEND generation in MapServer too, since that
> can be done via WMS as well.  :c)   I also have an inkling that
> having the ability to poll the mapfile for the layers available might
> be an interesting capability to add in that would allow for some
> interesting user GUI elements to be built around.
>
>
> ---------
>
>
> Here is my use case (if needed):
>
>
> Say I have a centerline file of a street network for a map, and then
> add in a Aerial photo background, I want to turn the centerlines off,
> but keep the labels as an overlay.  Both the centerlines and the
> labels are on by default at the mapfile.
>
>
> Thanks
>
>
> bobb
>
>
>
> _______________________________________________ mapserver-dev mailing
> list mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev



More information about the mapserver-dev mailing list