[Geoserver-devel] [Geoserver-users] Dynamic url's is not working for external graphics in SLD

Hi Manog.
Unfortunately GetLegendGraphic doesn’t support dynamic symbolizers in ExternalGraphic hrefs.
The reason is quite simple: the legend builder doesn’t have access to the Feature data, so it wouldn’t be possible for it to get a concrete value for Ikon attribute to build an existing url for the image.
Your alternative SLD allows the legend to be drawn, because you are using static urls.
Maybe for dynamic symbolizers we should support pre-rendered images, as asked in http://jira.codehaus.org/browse/GEOS-3747.

Mauro Bartolomeoli

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Dott. Mauro Bartolomeoli
@mauro_bart
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Thu, Jan 31, 2013 at 8:01 AM, Mauro Bartolomeoli <mauro.bartolomeoli@anonymised.com> wrote:

Hi Manog.
Unfortunately GetLegendGraphic doesn’t support dynamic symbolizers in ExternalGraphic hrefs.
The reason is quite simple: the legend builder doesn’t have access to the Feature data, so it wouldn’t be possible for it to get a concrete value for Ikon attribute to build an existing url for the image.
Your alternative SLD allows the legend to be drawn, because you are using static urls.
Maybe for dynamic symbolizers we should support pre-rendered images, as asked in http://jira.codehaus.org/browse/GEOS-3747.

Yep, agreed, for these data driven cases it seems the only sane solution (another possible one would be
to run a “unique” query against the data source and gather all possible values, but that would be slooow,
especially on non DBMS data sources).

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it