But how can I do to have correct getLegendgraphic. In fact, the
GetLegendGraphic output only one empty fill square.
I tried to make different rules for each code with a filter and with the
same polygonsymbolizer. But the result is an empty square for each rule.
So how can I represents the database stored color in the GetLegendGraphic
request without hard code it in SLD?
Thanks in advance for any solution.
There is none besides hard-coding the colors in the SLD.
The GetLegendGraphics code inspects only the SLD, and with good reason:
- the dataset might be huge (datasets with a hundredth million features
are not uncommon), generating a lengend by fully scanning them would
take various minutes even on powerful servers
- the GetLegendGraphics afaik must generate one box per rule. But there
is no way to tell which color it should be drawn, as each feature
catched by the rule might be using a different one (even in the hp
of scanning the dataset fully).
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.