[OpenLayers-Trac] [OpenLayers] #533: Style vector layers with SLD

OpenLayers trac at openlayers.org
Sun Nov 11 07:09:05 EST 2007


#533: Style vector layers with SLD
----------------------+-----------------------------------------------------
  Reporter:  sderle   |       Owner:             
      Type:  feature  |      Status:  new        
  Priority:  minor    |   Milestone:  2.6 Release
 Component:  Format   |     Version:             
Resolution:           |    Keywords:  review     
----------------------+-----------------------------------------------------
Comment (by elemoine):

 Replying to [comment:7 ahocevar]:
 > The current version of the patch does not reflect the latest changes,
 those are only in the ahocevar/sldRenderer sandbox. I still have to create
 some tests for the new features, and after that I will split up this patch
 into three separate tickets, because there is more in it than just SLD. I
 think this will also be easier to review and move into trunk. So if this
 is ok, I'll split the patch up into the following three parts:
 >
 >  * Rules Framework (!OpenLayers.Rule and subclasses)
 >  * Styles Framework (!OpenLayers.Style, depends on the Rules Framework)
 >  * SLD Parser (!OpenLayers.Format.SLD, depends on the Styles Framework)

 Splitting up the patch into these three patches will certainly ease the
 review. Thanks.

 > The Styles Framework is the only part that has impact on existing code.
 >
 > Another question, because this was commented by Eric: what do the other
 developers think about changing all style properties for features,
 !Control.Select and layers to be !OpenLayers.Style instead of the style
 hash that is now being used?
 >
 > If that is desired, I would propose to change the style properties of
 those classes to type !OpenLayers.Style. The constructor of
 !OpenLayers.Style can already take a style hash as argument. So the only
 thing to change in existing applications would be from e.g.
 > {{{
 > layer.style = myStyleHash;
 > }}}
 > to
 > {{{
 > layer.style = new OpenLayers.Style(myStyleHash);
 > }}}

 I'm not sure breaking compatibility is an option before 3.0.

 What could be done though is use !OpenLayers.Style everywhere internally,
 and translate old-style style objects passed by the user to
 !OpenLayers.Style objects. Then, for 3.0, we'll just remove these
 translations and force the user to use !OpenLayers.Style.

 My opinion here.

 --
 Eric

-- 
Ticket URL: <http://trac.openlayers.org/ticket/533#comment:8>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list