[OpenLayers-Users] Calculate resolution for tiled images

Jimmy Aumard jimmy.aumard at gmail.com
Fri Apr 23 06:20:50 EDT 2010


Hello,

I have no geographic tiled images who I put in OL with
OpenLayers.Layer.TileCache but in some zoom I have tiled who show twice.

I have an array (size of total image by zoom) like this

var zoomDim = [[259, 315], // zoom 0 = 259*315
               [517, 631],
               [1035, 1262],
               [2069, 2523],
               [4138, 5046],
               [ 8276, 10092]]; // zoom 5 8276 * 10092

And I would like to know what resolutions put in my map. I have test this :

var _size = new OpenLayers.Size(300, 300);

    map = new OpenLayers.Map( 'map', {
        tileSize : _size,
        maxExtent: new OpenLayers.Bounds(0,0,8276,10092),
        //maxResolution: 'auto',
        resolutions:[8276/300,4138/300,2069/300,1035/300,517/300,259/300],
        numZoomLevels:6

    });
It's work for the 3 first zoom but after I have tiles show twice. I think
it's my resolutions are wrong.
If anyone can help please.

Thanks


-- 
Aumard Jimmy
Développeur

KINAXIA
c/o CICA / PacaEst
2229 Route des Crêtes
F-06560 Sophia Antipolis

Tél.: +33 (0)4 8973 0242
Mob.: +33 (0)6 6017 2827
Fax : +33 (0)4 8307 6583

http://www.kinaxia.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100423/5750581a/attachment.html


More information about the Users mailing list