On Sat, Dec 11, 2010 at 8:59 AM, Eric Lemoine
<[email protected]> wrote:
> On Friday, December 10, 2010, Alexandre Dube <[email protected]> wrote:
>>
>>
>>
>>
>>
>>
>>     Hi Cédric,
>>
>>       I had to do that once.  Here's what I did :
>>
>>       * set both original layers their according minScale and maxScale
>>     properties
>>       * set both layers displayInLayerSwitcher: false and make sure they
>>     are not added to your layer tree
>>       * create a dummy layer with the name of your dataset, put it in
>>     your layertree
>>       * register events (both layers visibility should follow this one,
>>     on map "zoomend", check if you need to toggle the 2 layers, etc.)
>>
>>     That way, you have your unchanging layer in your tree and the
>>     changes are transparent.  Could that be okay with you ?
>
> I was going to suggest something along these lines. You can also look
> at IGN's GeoPortal API, they have a "Group" (or "Aggregate", or ..., I
> can't remember) layer type that you may want to take a look at.

See 
<http://api.ign.fr/geoportail/api/doc/1.1/jsdoc/files/Geoportal/Layer/Aggregate-js.html>.
But one would need to look at the code to understand what this
Aggregate layer type provides exactly.



-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [email protected]
http://www.camptocamp.com
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to