[OpenLayers-Users] Layer.Vector with multiple data sources

Alexandre Dube adube at mapgears.com
Thu Jan 8 12:42:57 EST 2009


Andreas Hocevar wrote:
> Alexandre Dube wrote:
>   
>> Hi devs,
>>
>>   I want to discuss about a new feature on Layer.Vector : multiple data 
>> sources depending on the zoom level.
>>
>>   I already developped something very similar : 
>> http://dev4.mapgears.com/bdga/bdgaWFS-T.html  At zoom level 0 to 3, you 
>> will see vector polygons ( regions ).  Each level comes from a different 
>> source that has been normalized to improve the rendering speed.  So, 
>> each zoom level has its own vector layer and they are all hidden from 
>> the layer switcher.  They are controlled by a dummy layer.
>>
>>   At first, I thought this was cool, but now that I think about it, a 
>> single type of data, the Quebec regions on my example, should be 
>> displayed on a single layer.  If I want to interact with my data the way 
>> it is now, I need to look at 4 different layers and keep track of a 
>> dummy layer also.  A single vector layer with the possibility to give it 
>> multiple data sources depending on the zoom level would be much better.  
>> What do you think ?  It could be a nice upgrade.
>>   
>>     
>
> It should be easy to customize the strategy you are using (I assume
> Fixed or BBOX) to change the url and/or params of the protocol on the
> zoomend event (similar to the moveend event handler in the BBOX
> strategy). This strategy would then have to know the urls/params for
> each zoom level, and you would just interact with one vector layer.
>
> Regards,
> Andreas.
>
>   
Exactly.  It's a common practice on the web to have data normalized by 
scales, so it would be quite useful to have such an upgrade.

So, you would modify both BBOX and Fixed ?  Do others have opinions 
about it ?

-- 
Alexandre Dubé
Mapgears
www.mapgears.com




More information about the Users mailing list