[OpenLayers-Dev] Rule subclasses and 2.6

Eric Lemoine eric.c2c at gmail.com
Sat Apr 5 11:52:51 EDT 2008


On Thu, Apr 3, 2008 at 10:21 AM, Andreas Hocevar
<andreas.hocevar at gmail.com> wrote:
> Tim-
>
>
>  On Thu, Apr 3, 2008 at 6:14 AM, Tim Schaub <tschaub at openplans.org> wrote:
>  >  The new style work includes the addition of OpenLayers.Rule and
>  >  subclasses.  The base Rule class corresponds well to the sld:Rule
>  >  element in the SLD spec (min/max limits constraints, symbolizers, etc.).
>  >
>  >  The subclasses of Rule (Comparison, FeatureId, and Logical) correspond
>  >  well to ogc:Filter elements in the Filter Encoding specification.
>  >  Though our Rule subclasses can have a symbolizer, an ogc:Filter knows
>  >  nothing of a symbolizer - in SLD, an ogc:Filter element is a child of an
>  >  sld:Rule that has a symbolizer.
>
>  To me, a logical step would be to have one Rule class, which has
>  minScale, maxScale, symbolizer, and a filter property. There would be
>  a new class OpenLayers.Filter with subclasses with the filter-related
>  code of the current Rule subclasses. I think that is in line with what
>  you think.
>
>
>  >  1) Do no mark Rule subclasses as part of the API.  Later, change them so
>  >  they are Filter subclasses and require that they be added to a Rule
>  >  (with a symbolizer) for things like styling.  They could also be used
>  >  alone (without rules) for things like WFS.  This would also require
>  >  changing the georss-flickr.html example (that uses Rule.Comparison) and
>  >  the wiki page on styling.
>
>  I am in favour of that option. We do not encourage people to touch
>  rules directly anyway (except for the georss-flickr example).

I find it a bit weird to show people an example that uses Rule
subclasses and encourage those same people not to use these
subclasses.

--
Eric



More information about the Dev mailing list