On 27/12/15 14:26, Brad Hards wrote:
> On Sat, 26 Dec 2015 04:55:31 PM epyks23 wrote:
>> I created a map in Geoserver and I have a lot of layeres.
>>
>> How can I add a legend to it (hopefully without using code)? I want the user
>> to be able to switch layers on and off.
> Are you really looking for a legend for each layer, or a map-layer switcher?

And if you are looking for a map layer switcher, are you using 
OpenLayers 3? You will need  a little JavaScript, but there are several 
layer switchers that you can use (OL3 lacks a layer switcher). Here is one:
https://github.com/walkermatt/ol3-layerswitcher
Example:
https://github.com/walkermatt/ol3-layerswitcher/blob/master/examples/layerswitcher.js
Interactive example:
http://rawgit.com/walkermatt/ol3-layerswitcher/master/examples/layerswitcher.html

Kind regards,

-- 
Ben Caradoc-Davies <b...@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to