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. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
