[OpenLayers-Users] Value of mousePosition control wrong
Jimmy Aumard
jimmy.aumard at gmail.com
Tue Apr 27 03:20:04 EDT 2010
Hello,
I have overwrite the TileCache class for show my own tiles (no geographic
data) but I don't know how the control position give me wrong value
I have configure my map like this:
var _size = new OpenLayers.Size(300, 300);
map = new OpenLayers.Map( 'map', {
tileSize : _size,
maxExtent: new OpenLayers.Bounds(0,0,8400,10200),
resolutions:[8400/300,4200/300,2100/300,1200/300,600/300,300/300],
numZoomLevels:6
});
map.addControl(new OpenLayers.Control.MousePosition());
And my layer :
var zoomDim = [[300, 600],
[600, 900],
[1200, 1500],
[2100, 2700],
[4200, 5100],
[ 8400, 10200]];
var layer = new OpenLayers.Layer.TileCachePreventimmo("TileCache Layer",
["http://jimmy.preventimmo.fr/api_carto/"],
"168385",
{
zoomImages : zoomDim, //Array with image size for the different
zoom
format: 'image/jpg'
});
In the right-top corner of my tiles mouseposition give me :
zoom : 0 -> 8400,16600
1 -> 8400,12500
2 -> 8400, 10400
3 -> 8400, 10400
4 -> 8400, 10200
5 -> 8400, 10200
I think I should have always 8400,10200 like this example
http://oldmapsonline.googlecode.com/svn/trunk/openlayers/examples/zoomify.html
Maybe my resolutions are wrong I don't know how calculate then, I have try
(32,16...) but some tiles are show twice.
Thanks for help
Jim
--
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/20100427/1ad9b436/attachment.html
More information about the Users
mailing list