[OpenLayers-Dev] vector behavior ideas

Tim Schaub tschaub at openplans.org
Wed May 7 17:22:44 EDT 2008


Eric and other interested in vector behavior:  Just a quick note to say 
I agree with your thoughts below.  We talked a bit about this on IRC. 
Seems like the simplest thing is to allow for a list of strategies on a 
vector layer.

var layer = new OpenLayers.Layer.Vector2(name, {
     strategies: [
         new OpenLayers.Strategy.BBOX(),
         new OpenLayers.Strategy.Paging()
     protocol: new OpenLayers.Protocol.Foo(),
     format: new OpenLayers.Format.Bar()

Will need to see how it works in practice, but it might be the most 
straightforward solution.


Tim Schaub wrote:
> Hey-
> I will try to be around for today's meeting time to talk vector behavior 
> ideas.  Hope others with ideas can make it.
> http://timeanddate.com/worldclock/fixedtime.html?month=5&day=7&year=2008&hour=20&min=0&sec=0&p1=0
> http://tinyurl.com/5w3rkp
> Tim
> Eric Lemoine wrote:
>> Hello
>> Below are two ideas for our vector behavior work. For those who aren't
>> aware of that effort, see
>> http://trac.openlayers.org/wiki/Proposal/VectorBehavior.
>> Strategy - a Strategy object defines behavior related to commit and
>> update of features. In practise I think we'll have strategies that
>> relate to commit and others that relate to update. For example, the
>> current BBOX strategy relates to update. With that in mind, I think
>> it'd make sense to compose strategies. In this way, we could create a
>> strategy object that is composed of a commit strategy and add update
>> strategy.
>> Protocol - I think we need some abstraction to pass filters to
>> protocols' read() method. We have the Filter class hierarchy for
>> exactly this, don't we? The read() method could take as an argument
>> either an object with protocol-specific params or a Filter object. If
>> a filter object is passed the protocol would need to transtate that
>> filter object into its own filtering mechanism. E.g. the WFS protocol
>> would create  OGC Filter Encoding tags.
>> Thoughts?
>> --
>> Eric
>> _______________________________________________
>> Dev mailing list
>> Dev at openlayers.org
>> http://openlayers.org/mailman/listinfo/dev
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
> !DSPAM:4033,4821ca80205791637810514!

More information about the Dev mailing list