[OpenLayers-Users] GML and SLD

Christopher Schmidt crschmidt at metacarta.com
Thu Sep 6 07:23:58 EDT 2007


On Thu, Sep 06, 2007 at 12:44:00PM +0200, Jacolin Yves wrote:
> Hi List,
> 
> I am looking how to change "icons" of a GML layer. I read this bug trac [1] 
> which seems working for WMS layer (not tested but seems interesting).
> 
> Is this working for GML layers? This bug indicates that it could be 
> implemanted for the 2.6 release.

You've linked to a bug on SLD rendering. Client side SLD rendering is
vaguely planned for 2.6. 

However, it is possible to style your features when loading GML: you
simply set up the default styles for your layer to have things like
strokeColor/fillColor or graphicHeight/Width/externalGraphic. 

If you need to do per-feature rendering decisions, you can also do them
in the preFeatureInsert hook, by looking at the passed in feature and
changing its style properties.

See http://openlayers.org/dev/examples/vector-features.html for more
examples.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list