[resend, something in the Nabble/SourceForge mailing list setup is funky]
A while back
(http://www.nabble.com/Dynamic-Colors%2C-from-Attributes-Propreties-tf3254992.html#a9048975)
I asked about passing thru parameters from the raw (i.e. postgis) data into
the SLD rendering. The example being if I stored a color for each feature
in the DB, could that color be called upon in the SLD. The answer was yes,
as such:
<PolygonSymbolizer><Fill>
<CssParameter
name="fill"><ogc:PropertyName>color</ogc:PropertyName></CssParameter>
</Fill></PolygonSymbolizer>
But now I'm getting even spicier. I am generating fancier data, in this
case lets say some pie charts or sparkline graphs, for each of many Point
features, each of which is named according to the 'id' column of the feature
in the DB. I should be able to do something like this to dynamically pull
in the different graphs as ExternalGraphic icons, but it certainly doesn't
work:
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource
xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple"
xlink:href="http://example.com/sparklies/<ogc:PropertyName>id</ogc:PropertyName>\.png"/>
<Format>image/png</Format>
</ExternalGraphic>
</Graphic>
</PointSymbolizer>
the error I get (in the spanky new GeoServer inline SLD editor) is:
INVALID XML: The value of attribute "xlink:href" associated with an element
type "OnlineResource" must not contain the '<' character.
Now of course this makes sense from an XML formatting standpoint, but I
think there should be some way around it, in order to increase the power of
GeoServer for doing real good GIS and mapping. Please don't tell me to use
OpenLayers and make a WFS that uses JavaScript to pull in the icons. It's a
total pain (tho I may very well do it), but also then prohibits you from
automatically rendering a given map w/out human intervention.
more recently, I tried putting everything up through:
<PointSymbolizer>
<ogc:PropertyName>resource</ogc:PropertyName>
</PointSymbolizer>
but none of it gets passed the SLD validation (whereas using the
PropertyName inside other parts of the SLD does).
thanks,
mike
--
View this message in context: http://www.nabble.com/Dynamic-ExternalGraphic-icons-from-Attribute-Properties-tf3899597.html#a11055025
Sent from the GeoServer - User mailing list archive at Nabble.com.