[OpenLayers-Trac] [OpenLayers] #1531: add support for geometry type aware styling rules

OpenLayers trac at openlayers.org
Wed May 21 07:10:32 EDT 2008


#1531: add support for geometry type aware styling rules
------------------------------+---------------------------------------------
  Reporter:  ahocevar         |       Owner:  ahocevar   
      Type:  feature          |      Status:  new        
  Priority:  minor            |   Milestone:  2.7 Release
 Component:  Style            |     Version:  2.6        
Resolution:                   |    Keywords:             
     State:  Needs More Work  |  
------------------------------+---------------------------------------------
Changes (by ahocevar):

  * state:  Review => Needs More Work

Comment:

 Andrea Aime of GeoServer just pointed me to a better way to do this. We
 start with SLD magic like this (which can be used in GT2-based
 applications like uDig or GeoServer):
 {{{
 <PropertyIsEqualTo>
  <Function name="geometryType">
    <PropertyName>the_geom</PropertyName>
  </Function>
  <Literal>Point</Literal>
 </PropertyIsEqualTo>
 }}}
 So instead of using the GeometryTypes property of the rule, we would
 define functions in the filter, e.g.
 {{{
 Filter.functions = {
     geometryType: function(feature) {
         return feature.geometry.CLASS_NAME;
     }
 }
 }}}
 This will allow us to do other cool things with filters too. It is almost
 in line with the rule context, except that the rule context (see #1548)
 should be replaced by filter functions.

 I will start working on that as soon as I have time.

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


More information about the Trac mailing list