[OpenLayers-Dev] new Strategy.OptionsByZoom

Eric Lemoine eric.c2c at gmail.com
Sun Jan 18 13:36:54 EST 2009


Hi

If the OptionByZoom strategy inherits from BBOX then it wouldn't be
possible to use it with other "read features" strategies (such as the
Grid strategy I started developing). Composition is thus to be favored
here I guess.

I consider OptionByZoom is a custom strategy, so I don't see its
dependency on BBOX as a problem, nor is the fact that it must be
activated before the BBOX strategy.

Cheers,

Eric

2009/1/16, Sebastian Benthall <seb at opengeo.org>:
> Would it work to have OptionByZoom be a subclass of the BBOX strategy?
>
> On Fri, Jan 16, 2009 at 1:58 PM, Alexandre Dube <adube at mapgears.com> wrote:
>
>> Hi Ivan,
>>
>>  That's what I had in mind in the beginning, but others like Eric
>> Lemoine convinced me not doing so.  The purpose of the BBOX strategy is
>> to toggle the protocol.read when necessary and the purpose of
>> OptionsByZoom is only to change the layer's protocol and format options
>> before doing anything else.  This is a different behavior than the BBOX
>> strategy.  Also, this strategy could be used with other ( not yet
>> implemented ) strategies.
>>
>>  I agree with the fact that it's wrong to have a strategy dependent of
>> an other.  Also, it won't work if you declare it after BBOX because it
>> won't trigger its options changing events before.
>>
>>  What do you think ?
>>
>> Alexandre
>>
>> Ivan Grcic wrote:
>> > Hi,
>> >
>> > tnx Alex, very usefull option!!
>> >
>> > I think something like should be inside the BBOX strategy..and not
>> > separate strategy that is dependent on it.
>> >
>> > Greetings,
>> > Ivan
>> >
>> > On Thu, Jan 15, 2009 at 4:44 PM, Alexandre Dube <adube at mapgears.com>
>> wrote:
>> >
>> >> Hi devs,
>> >>
>> >>  http://trac.openlayers.org/ticket/1905 is an unassigned ticket
>> implementing a new feature : Strategy.OptionsByZoom
>> >>
>> >>  See live examples of use :
>> >>    (working) http://dev4.mapgears.com/bdga/options-by-zoom-bdga.html
>> >>    (missing different data sources)
>> http://dev.openlayers.org/sandbox/adube/openlayers/examples/options-by-zoom.html
>> >>
>> >>  Comments are welcomed,
>> >>
>> >> Regards,
>> >>
>> >> --
>> >> Alexandre Dubé
>> >> Mapgears
>> >> www.mapgears.com
>> >>
>> >> _______________________________________________
>> >> Dev mailing list
>> >> Dev at openlayers.org
>> >> http://openlayers.org/mailman/listinfo/dev
>> >>
>> >>
>>
>>
>> --
>> Alexandre Dubé
>> Mapgears
>> www.mapgears.com
>>
>> _______________________________________________
>> Dev mailing list
>> Dev at openlayers.org
>> http://openlayers.org/mailman/listinfo/dev
>>
>
>
>
> --
> Sebastian Benthall
> OpenGeo - http://opengeo.org
>



More information about the Dev mailing list