[OpenLayers-Dev] bbox strategy and zooming

Tim Schaub tschaub at opengeo.org
Thu Nov 13 16:19:58 EST 2008


Hey-

Oh, and one more thing...

Eric Lemoine wrote:
> Thanks for putting this patch together Tim.
> 
> Initially Chris wanted that the bbox strategy behave aggressively on
> zoom in, but, as an optimization, only if the number of features in
> the layer is not lower than the maxfeatures value set in the protocol.
> 
> The change you're proposing wouldn't allow this. The change I proposed
> involved adding a new Integer option to the bbox strategy. If that
> option is null the strategy behaves as currently. If it's non-null
> then it behaves aggressively if the number of features in the layer is
> not lower than the option value.
> 
> Chris was concerned with configuration data duplication - maxfeatures
> is kinda set in the protocol as well as in the strategy; which doesn't
> bother me actually.
> 
> You may concerned with the fact that my proposed option targets a
> specific case (maxfeatures-parameterized requests) and doesn't address
> other, maybe more common, cases. I actually don't see other cases when
> a more aggressive mode makes sense, but that's probably just me.
> 

Other use cases: I have a service that returns the top ten pizza joints 
in any bounding box.  You don't get to ask for the top 11.

A nice service would be one that returned different level of detail 
depending on the extent of the request.  You ask for the world, I give 
you a simplified road network.  You ask for your neighborhood, I give 
you a bit more detail.  Obviously, you'd want to be able to have control 
over what you ask for - but some clients (say Google Earth) don't let 
you tweak request parameters (aside from bbox) as you navigate around.

Tim

PS - I don't really have a pizza service.  But flickr searches take a 
bbox and impose a limit on the number of items returned.  And feeds from 
big search services typically limit the number of results they return.

> Cheers,
> 
> Eric
> 
> 2008/11/13, Tim Schaub <tschaub at opengeo.org>:
>> Hey-
>>
>> Christopher Schmidt wrote:
>>> I'm still lost as to how to go about coding what I want :) I want to
>>> have maxfeatures, and more aggressive invalidation because of it. Any
>>> suggestinos as to how I might go about implementing that, or should I
>>> just toss together something and people will look at afterwards?
>>>
>> If you haven't already tossed something together, see the patch for
>> http://trac.openlayers.org/ticket/1830.
>>
>> Set resFactor to 1 if you want to request features with every change in
>> resolution.
>>
>> Tim
>>
>>> Regards,
>>
>> --
>> Tim Schaub
>> OpenGeo - http://opengeo.org
>> Expert service straight from the developers.
>> _______________________________________________
>> Dev mailing list
>> Dev at openlayers.org
>> http://openlayers.org/mailman/listinfo/dev
>>


-- 
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.



More information about the Dev mailing list