NOTICE: help.openstreetmap.org is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum

# function between latitude and tile number

 0 Hi, I am a developer and I need the function y=f(x)=? between the latitude (=x; -90 <= x <= 90) and the tile number on zoom level 16 (=y; 0 <= y <= 65536) for my mobile game. I exported the osm tiles with Maperitive and I need to convert the gps position of the phone to the tile number (x, y). I already have an algorithm to determine the x value of the tile number but I need the y value too. I can get the function by myself, but I would need to spend days on getting an accurate function because it seems to be a function with a degree over 10. So anyone knows the function? Or maybe how to convert the tile numbers to meters? If you're wondering why I don't just simply implement osm to my game ... one reason is that I need to deactivate some labels for my game. I attached three screenshots with the graph, the value table and the tiles for better understanding. Full graph: Part of the graph with value table: Tiles generated with Maperitive (zoom level 16): asked 26 Jun '17, 18:53 Time2Design 15●2●2●3 accept rate: 0%

 3 Take a look at http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames answered 26 Jun '17, 19:20 maxerickson 12.7k●10●83●176 accept rate: 32% thank you! (26 Jun '17, 20:26) Time2Design
 toggle preview community wiki:

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

Question tags:

×287
×48
×4

question asked: 26 Jun '17, 18:53

question was seen: 2,832 times

last updated: 26 Jun '17, 20:26

### Related questions

NOTICE: help.openstreetmap.org is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum