<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thank you kindly,<br>
<br>
I will try it :)<br>
<br>
Pierre Giraud wrote:
<blockquote
cite="mid:cb68959b0910151137g29e4cc9p1dcca4659e12f62e@mail.gmail.com"
type="cite">
<pre wrap="">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
<a class="moz-txt-link-rfc2396E" href="mailto:adrian_gh.popa@romtelecom.ro"><adrian_gh.popa@romtelecom.ro></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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:
<a class="moz-txt-link-freetext" href="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">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</a>
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
<a class="moz-txt-link-abbreviated" href="mailto:Users@openlayers.org">Users@openlayers.org</a>
<a class="moz-txt-link-freetext" href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<pre wrap=""><!---->
--
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 : <a class="moz-txt-link-abbreviated" href="mailto:pierre.giraud@camptocamp.com">pierre.giraud@camptocamp.com</a>
<a class="moz-txt-link-freetext" href="http://www.camptocamp.com">http://www.camptocamp.com</a>
</pre>
</blockquote>
<br>
<br>
</body>
</html>