Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have geoserver layer with sld style applied. The sld have like 50 rules using type attribute of the feature. Now i need to generate legend but only for specific area (i have bbox coordinates). I am doing this on server side and i can get all the features and their attributes of the choosen area (but i don't have access to style graphics ).

The only way i can think of implementing this is to generate sld style (rules) dynamically and pass it to geoserver as SLD_BODY. It seems a lot of work so I wonder maybe there is a better way of doing this?

Or maybe it is possible to pass some kind of parameter array to getLegendGraphic request like array of features ids or their type?

share|improve this question
up vote 2 down vote accepted

There is a proposal (here) that will implement this functionality. Feel free to offer any help you are able to.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.