On Wed, Jun 2, 2010 at 3:40 PM, Fabian Patzke (OL)
<listensamm...@patzi.de> wrote:
>
> Hi there,
> I wanted to set up my OverViewMap with 2 layers. The layers should be
> visible depending on the overviewmaps resolution. So I initialized my layers
> as following:
>
>  var ov1 = new OpenLayers.Layer.WMS(
>    "name1"
>    ,"http://url1?";
>    ,{
>      layers: "0"
>      ,format: "image/jpeg"
>    }
>    ,{
>      ,"maxResolution": 1765.0
>      ,"minResolution": 120.0
>    }
>  );
>  var uebersichtsLayerLK = new OpenLayers.Layer.WMS(
>    "name2"
>    ,"http://url2?";
>    ,{
>      layers: "1"
>      ,format: "image/png"
>    }
>    ,{
>      ,"maxResolution": 120.0
>      ,"minResolution": 0.01
>    }
>  );
>
> And the ovMap:
>
>  var ovOpts = {
>    mapOptions: {
>      maxExtent: map.getMaxExtent()
>      ,projection: map.getProjection()
>      ,units: map.getUnits()
>      ,maxResolution: 7059.0
>      ,minResolution: 0.01
>    }
>    ,layers: [
>      ov1
>      ,ov2
>    ]
>    ,size: new OpenLayers.Size(275,150)
>    ,div: ...
>    ,maxRatio: 40
>    ,minRation: 10
>  };
>  var ovMap = new OpenLayers.Control.OverviewMap(ovOpts);
>  map..addControl(ovMap);
>
> But this wont work as I aspect to work. Both layers are visible from start
> and not only if they are in the right resolution.
> Am I missing something? If anyone can point me mistake, or tell me that it
> isn't possible I'll be glad.

Hi. Try using OpenLayers trunk and setting numZoomLevels to null in
your layers' options. I hope it'll work as you expect it to work.
Cheers,


-- 
Eric Lemoine

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

Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to