[OpenLayers-Trac] [OpenLayers] #1120: users should be able to customize the select style per feature

OpenLayers trac at openlayers.org
Fri Nov 2 16:19:18 EDT 2007


#1120: users should be able to customize the select style per feature
----------------------+-----------------------------------------------------
  Reporter:  tschaub  |       Owner:             
      Type:  feature  |      Status:  new        
  Priority:  minor    |   Milestone:  2.6 Release
 Component:  general  |     Version:  2.5        
Resolution:           |    Keywords:             
----------------------+-----------------------------------------------------
Comment (by ahocevar):

 Replying to [ticket:1120 tschaub]:
 > I'd like to rework how we store styles - until then, it would be nice to
 support custom select styles for features.

 Tim, for a more elegant way of storing styles, you might like the style
 framework I created for sld rendering (sandbox/ahocevar/sldRenderer).
 Since we were talking about it at the FOSS4G code sprint, there have been
 major improvements.

 Although primarily created for sld rendering, it was designed open enough
 to work completely independent of any sld use cases. It provides a style
 class (OpenLayers.Style) with a defaultStyle and a defaultSelectStyle
 property. The minimum requirement for styling vector layers or features is
 to set those two properties.

 In combination with the rules framework (OpenLayers.Rule and subclasses),
 styling can also be done dependant of map scale (using the
 minScaleDenominator and maxScaleDenominator properties) and attributive
 filters known from the OGC filter specification. Rules are no longer
 stored as Javascript eval snippets, they are now cleanly kept in classes
 that also allow for hierarchically stacked rule constructs.

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


More information about the Trac mailing list