On Wednesday, November 3, 2010, Charles Galpin <cgal...@lhsw.com> wrote:
> Well, thanks for the nudge. I decided to start clean so I could give you as 
> simple an example as possible, which made me realize I was actually testing 
> on a WMS layer to avoid loading too much data. With a clean start I had to 
> trouble getting a vector layer working as desired with maxResolution = 10.
>
> However I am still unable to get the WMS layer to do the same or similar. I 
> don't need this as much as I'd like to understand, it, so here is my WMS 
> layer code
>
> var wmsLayer = new OpenLayers.Layer.WMS(
>                 "WMS Layer", "/geoserver/wms",
>                 {
>                     layers: 'streets',
>                     maxResolution: 10,
>                     styles: '',
>                     srs: 'EPSG:4326',
>                     format: 'image/png',
>                     tiled: 'true',
>                     tilesOrigin : map.maxExtent.left + ',' + 
> map.maxExtent.bottom,
>                     transparent: true
>                 },
>                 {
>                     buffer: 0,
>                     'opacity': 0.75, 'isBaseLayer': false, 'wrapDateLine': 
> true
>                 }
>             );
>
>
> Looking at the layer in firebug it does not have the maxResolution I set, and 
> resolutions ranges from 1.40625 to 0.00004291534423828125. I tried a middle 
> of the road value 0.02197265625 as both max and min resolution with no effect.

Set maxResolution (or minResolution) in the layer options (fourth arg)
as opposed to the layer params (third arg). Layer params include
key/value pairs that are sent to the server. Layer options configure
the Layer JavaScript object.

-- 
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
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to