[OpenLayers-Users] GML and SLD

Christopher Schmidt crschmidt at metacarta.com
Fri Sep 14 10:50:08 EDT 2007


On Fri, Sep 14, 2007 at 04:08:54PM +0200, Jacolin Yves wrote:
> Le Thursday 06 September 2007 13:23:58 Christopher Schmidt, vous avez ?crit?:
> > 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,
> 
> Hi,
> 
> I have some question about this. I succeed to override the preFeatureInsert 
> and succeed to change the style for all feature (which is not my final 
> purpose).
> 
> I would like to use a sld webservice for my layer, how can I use the sld 
> content in the preFeatureInsert? Here my code:

I'm not sure I understand. When you say "SLD webservice" -- do you mean
a sevice which accepts a GML doc and an SLD URL and returns images?

Essentially, the question is "What is the URL you are visiting, and what
is the content you are receiving from that URL?"

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list