Hi everyone, this is my first post so go gentle on me!<BR><BR>I'm writing a GPS mapping program for use whilst cruising the inland waterways in a canal boat (www.waterexplorer.co.uk).  I've currently got about 250 members using mysite and at least 25 active day-to-day.<BR><BR>I'm currently using my own mapping data to display the waterways and thats working fine, but I'd like the ability to display OSM data (probably from the tile server) as a background for my data/overlays.  The software is a "thick client" c# .net program under Windows which can cache the tiles as they download - most users are on 3G data cards.<BR><BR>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.<BR><BR>Heres what I do so far:<BR><BR>Assume: Latitude = 52.478624 and Longitude= -1.913584 which is the centre of Birmingham, UK.<BR><BR>Using the code supplied on http://wiki.openstreetmap.org/index.php/Slippy_map_tilenames#Tiles<BR><BR>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.png<BR><BR>Now obviously the map tiles don't line up exactly with my coordinates, so I use the formulas on the wiki to get the tile edges: north east=(52.4794347,-1.9129943) and SW=(52.47859,-1.91436).   <BR><BR>I think I need to offset the tiles pixel location on screen by a certain amount so that I get my required point on the centre of the map, but this is where I'm getting stuck.  Using the latitudes from these I can calculate that each tile is
92.942metres wide at zoom 18, or 0.363m per pixel - does this help?<BR><BR>Can anyone help me with this please?<BR><BR>Regards<BR><BR>Stuart<BR><BR><BR><BR><BR>