Re: [OSM-dev] Coordinate to Pixel at lowzoom

2009-10-08 Thread OJ W
Do the conversion at 8 zoom levels higher than your tile (i.e. the tile which that pixel represents) i.e. if someone clicks the top-left pixel of 1,1...@z1 then do tile2ll of 256,2...@z8. If they click the 3rd pixel across from that then do tile2ll of 256+3,2...@z8. (replace 8 by log2 of your

Re: [OSM-dev] Coordinate to Pixel at lowzoom

2009-10-08 Thread OJ W
err, that should probably be z9 in my example. Something like: lookup_x = tile_x * tile_width + pixel_x lookup_y = tile_y * tile_width + pixel_y lookup_z = tile_z + log2(tile_width) ___ dev mailing list dev@openstreetmap.org

[OSM-dev] Coordinate to Pixel at lowzoom

2009-10-07 Thread Lynn W. Deffenbaugh (Mr)
Greetings, I've searched the list archives, but didn't spot this question, so here goes. I'm developing a client that uses OpenStreetMap tiles and overlays coordinate (lat/lon) information above it. It's custom C coded, so I can't use any of the libraries out there. I understand the

Re: [OSM-dev] Coordinate to Pixel at lowzoom

2009-10-07 Thread Dan Homerick
On Wed, Oct 7, 2009 at 6:36 PM, Lynn W. Deffenbaugh (Mr) ldeff...@homeside.to wrote: However, at zoom levels less than 4 (or so), I get a worsening offset to the north and south of the equator as I map objects onto the maps.  You can see this effect at the following URL:

Re: [OSM-dev] Coordinate to Pixel at lowzoom

2009-10-07 Thread andrzej zaborowski
Hi, 2009/10/8 Lynn W. Deffenbaugh (Mr) ldeff...@homeside.to: I'm developing a client that uses OpenStreetMap tiles and overlays coordinate (lat/lon) information above it.  It's custom C coded, so I can't use any of the libraries out there. I understand the discussion on the following URL