<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:12pt">Hi together,<br><br>I've set up a small test page to integrate a custom TMS Layer into OpenLayers. The tiles are displayed correctly but when I place a marker on the map it is placed north of the real position. Example:<br><br><span><a target="_blank" href="http://www.uecmoedling.at/maptest.html">http://www.uecmoedling.at/maptest.html</a></span><br><br>Mapnik layer is shown by default: shows the correct position<br>when switching the layer you get to a position which is exactly to the north of the real position<br><br>Maybe anyone can give me an hint which parameters I need to adjust to fix this shifting? I tried to modifiy the north/south bounds but this resulted in the marker changing position depending on the zoom level.<br><br>I got the following information from the people how manage the tile server but
 I don't know exactly what to do with these infos to make it work in OpenLayers:<br><br>The number of grids at a given zoom level is: gridWidth = 2^zoomlevel<br>The (earth) radius for the Mercator map projection is calculated as radius = (gridWidth * tileSize) / (2.0 * PI) where tileSize=256.<br><br>The x and y grid indexes are given by the calculated Mercator coordinate divided by the tile size:<br>&nbsp;&nbsp;&nbsp; xGrid = xCoordinate / tileSize<br>&nbsp;&nbsp;&nbsp; yGrid = yCoordinate / tileSize<br><br>Mercator coordinates will range from 0 through (gridWidth * tileSize).<br><br>The origin for the grid coordinates is at 180° W (false easting = radius * PI), and approx 85° N (false northing = -radius * PI), with x increasing toward the East and y toward the South. The scale (mpp) is determined by scale = radius * 2.0 * PI / (gridWidth * tileSize)<br><br>Other customers use an inverse flattening value of 298.257223563; so the projection is actually
 Mercator-ellipsoidal.<br><br>Thanks very much,<br>Michael<br><div><br></div>
</div><br></body></html>