Hi, I'm just putting together my first OL map and have run into a problem.
The map is using Bing maps for the base and several WMS overlays. I'm trying
to make a layer scale dependent with no success and have been through all
the tips I could find in the forums. I'm obviously missing something and am
questioning whether I've configured the resolutions and extents correctly
also. Here is the relevant code:

//Configure map
        var options = {
                projection: new OpenLayers.Projection("EPSG:900913"),
                units: "m",
                resolutions: [156543.03390625, 78271.516953125, 
39135.7584765625,
19567.87923828125, 9783.939619140625, 4891.9698095703125,
2445.9849047851562, 1222.9924523925781, 611.4962261962891,
305.74811309814453, 152.87405654907226, 76.43702827453613,
38.218514137268066, 19.109257068634033, 9.554628534317017,
4.777314267158508, 2.388657133579254, 1.194328566789627, 0.5971642833948135,
0.29858214169740677, 0.14929107084870338, 0.07464553542435169,
0.037322767712175846, 0.018661383856087923, 0.009330691928043961,
0.004665345964021981],
                maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 
20037508.34,
20037508.34),
                restrictedExtent: new OpenLayers.Bounds(-8903840, 5281647, 
-8788370,
5362210)
        };

...

var watercourses2 = new OpenLayers.Layer.WMS(
        "Watercourses",
        "http://gis.npca.ca/geoserver/gwc/service/wms?";,
        {
                layers: 'floodmapping:watercourses_2k',
                transparent: 'true',
                resolutions: [0.07464553542435169, 0.037322767712175846,
0.018661383856087923,      0.009330691928043961, 0.004665345964021981],
                displayProjection: new OpenLayers.Projection("EPSG:4326"),
                isBaseLayer: false
        });

I appreciate any help I can get, and I'm a newb so be gentle!
mcpiper
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Scale-dependent-layer-problems-tp5295582p5295582.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to