hihowever, what if someone wants to draw a point on a low scale tile? using the mentioned way will result in a displaced point to the north. does somebody has a proper formular to get lon/lat/zoom int x/y coords to a low zoom tile?
regards michael p.s.: sry at martijn for doublicated mail :> Martijn van Oosterhout schrieb:
On Fri, Aug 15, 2008 at 9:46 AM, Water Explorer Support <[EMAIL PROTECTED]> wrote:I can calculate and display the tiles without any issues, but the problem I'm having is actually plotting a point accurately on the tile. Heres what I do so far: Assume: Latitude = 52.478624 and Longitude= -1.913584 which is the centre of Birmingham, UK. Using the code supplied on http://wiki.openstreetmap.org/index.php/Slippy_map_tilenames#Tiles I can calculate that at zoom level 18, my x and y tiles are 129678 and 86020, so I get a tile URL of http://tile.openstreetmap.org/mapnik/18/129678/86020.pngYou're really close: those formulae at some point truncate the number they get to an integer, raw they produce something like 129678.xxx and 86020.yyy. If you take those fractional parts and multiply by the size of the image (in this case 256) it gives you the offset within the image. Hope this helps,
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

