[OpenLayers-Dev] vector-behavior review

Eric Lemoine eric.c2c at gmail.com
Sat May 31 05:57:28 EDT 2008


On Fri, May 30, 2008 at 7:52 PM, Tim Schaub <tschaub at opengeo.org> wrote:
> [...]
> Sounds like a decent solution.  Though I think you intended to spell
> "setProperty" as "setPropertyName" instead.

Good catch. I'll correct that. I'll use name "setProperty" everywhere.

>http://trac.openlayers.org/browser/sandbox/camptocamp/unhcr/lib/OpenLayers/Protocol/WFS/v1_0_0.js#L275
>
> I guess it's worth asking what other protocol will be serializing a filter
> using the filter format?

In my view, each protocol is responsible for translating/serializing
the OpenLayers.Filter object it is passed into something its
server-side counterpart can understand. For the example the MapFish
protocol (based on the HTTP protocol) translates it into GET
parameters. The OpenLayers.Filter class hierarchy serves as the common
filter representation - every protocol must adapt this common
representation to its specific representation. Hope that makes
sense...

> The bbox array is a handy representation of a bbox for anybody who is not
> going to be writing an ogc:Filter element.

I agree, but this is another representation of the BBOX filter. We
already have Filter.Spatial for that so why adding another
representation.

Now, specific protocols can *also* accept specific filter
representations. For example, the MapFish protocol read() method can
also accept a filter as an object with key:value pairs representing
the GET parameters.

Looking forward to your opinion on this,

Thanks guys,

--
Eric



More information about the Dev mailing list