[OSM-dev] How to translate coordinate to pixel for a tile ?

Rune Baggetun baggetun at gmail.com
Thu Nov 15 13:09:34 GMT 2007


Hi
I am currently experimenting with OSM and incorporating it into a J2ME
('java for mobiles') application . Using example code from the wiki
[1] I can retrieve individual tiles based on latitude- longitude data,
that I get over bluetooth from an external GPS device, into my
applications, but how do I translate between coordinates and pixels in
the retrieved tile ? For example If I want to draw a marker denoting
the position I get from my GPS device on the top of the tile I
retrieve.  Is there an API call for this?

[1 ]http://wiki.openstreetmap.org/index.php/Slippy_map_tilenames

Regards
-- 
Rune Baggetun




More information about the dev mailing list