Thank you kindly,

I will try it :)

Pierre Giraud wrote:
Hi Adrian,

Here's a code snippet that should help you find the resolutions of
your map. You can copy/paste/run it in the firebug's (multi-line)
console.

  var resolutions = [];
  for (var i = 0; i <= map.numZoomLevels; i++) {
    resolutions.push(map.getResolutionForZoom(i));
  }
  console.log(resolutions.join(','));

I hope this will help you.

On Thu, Oct 15, 2009 at 2:47 PM, Adrian Popa
<[email protected]> wrote:
Hello everyone,

I'm trying to convert my WMS layer to use tilecache in the backend and I have 
stumbled over this problem which I can't solve yet:

Here is my request:
http://terra/cgi-bin/tilecache.cgi?MAP=%2Fvar%2Fwww%2Fhtml%2Fmap%2Frtc_base.map&TRANSPARENT=false&FORMAT=image%2Fpng2&MAP_IMAGETYPE=agg&TRANSITIONEFFECT=resize&LAYERS=rtc_base&MAXEXTENT=left-bottom%3D(20.26%2C43.16)%20right-top%3D(29.7%2C48.46)&MAXRESOLUTION=156543&UNITS=m&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=-180,-90,180,270&WIDTH=256&HEIGHT=256

Here is the response of the server:

An error occurred: can't find resolution index for 1.406250. Available 
resolutions are:
[156543.03390000001, 78271.516950000005, 39135.758475000002, 
19567.879237500001, 9783.9396187500006, 4891.9698093750003, 2445.9849046875001, 
1222.9924523437501, 611.49622617187504, 305.74811308593752, 152.87405654296876, 
76.43702827148438, 38.21851413574219, 19.109257067871095, 9.5546285339355475, 
4.7773142669677737, 2.3886571334838869, 1.1943285667419434]

I've read over the internet and it seems I need to set the same 'resolutions' 
array in OpenLayers and in TileCache. No problem.
My question is: what is my "current" OpenLayers resolution? How can I find it?

Currently, my map has no special options set (about resolutions or zoom levels).

I've looked around the DOM, but the properties there only reflect what I set up 
at the map/layer creation.

Thanks.
Adrian


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




--
Pierre GIRAUD
G�omaticien, Analyste

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

Tel : 00 33 4 79 44 44 93
Mail : [email protected]
http://www.camptocamp.com



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

Reply via email to