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 ?

HTH,

Alexandre


On 10-12-10 03:25 AM, Cédric MOULLET wrote:
Ideally, yes. Is there somewhere a ticket or a code snippet ?
Thanks,
Cédric

2010/12/10 Bart van den Eijnden (OSGIS) <[email protected] <mailto:[email protected]>>

    Hi Cédric ,

    will the WMS layer be singleTile?

    IIRC there used be issues in OpenLayers switching between a
    gridded and a
    non-gridded layout in a layer, not sure if this still applies
    though (i.e.
    it could have been fixed).

    Best regards,
    Bart

    > Hi,
    > I'd like to create one Layer which can combine a WMS and a TileCache
    > layer.
    > The WMS or the TileCache layer will be visible depending of the zoom
    > level.
    > The first resolutions will be handled by the TileCache layer and
    the other
    > resolutions will be handled by the WMS layer.
    > What would be the best way to achieve that ? Is it possible to
    imagine a
    > custom layer type that can switch the layer based on the zoom
    level ?
    > Thanks in advance for any hints,
    > Cédric
    >
    > --
    > Welcome to my world: http://www.cedricmoullet.com/
    > My Linked In profile: http://www.linkedin.com/in/cedricmoullet
    > Twitter: http://twitter.com/cedricmoullet
    > Home sweet home:
    >
    
http://map.geo.admin.ch/?crosshair=bowl&zoom=11&X=185241.24219&Y=561288.90625&bgOpacity=0&selectedNode=node_ch.swisstopo.fixpunkte-lage1
    
<http://map.geo.admin.ch/?crosshair=bowl&zoom=11&X=185241.24219&Y=561288.90625&bgOpacity=0&selectedNode=node_ch.swisstopo.fixpunkte-lage1>
    > _______________________________________________
    > Users mailing list
    > [email protected] <mailto:[email protected]>
    > http://lists.osgeo.org/mailman/listinfo/openlayers-users
    >





--
Welcome to my world: http://www.cedricmoullet.com/
My Linked In profile: http://www.linkedin.com/in/cedricmoullet
Twitter: http://twitter.com/cedricmoullet
Home sweet home: http://map.geo.admin.ch/?crosshair=bowl&zoom=11&X=185241.24219&Y=561288.90625&bgOpacity=0&selectedNode=node_ch.swisstopo.fixpunkte-lage1 <http://map.geo.admin.ch/?crosshair=bowl&zoom=11&X=185241.24219&Y=561288.90625&bgOpacity=0&selectedNode=node_ch.swisstopo.fixpunkte-lage1>


_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users


--
Alexandre Dubé
Mapgears
www.mapgears.com

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to