# [closed] How to convert longitude and latitude to tileX and tileY in osm in iOS app(swift)

 0 Hi I'm Newbie I'm trying to make openstreetmap's tile on my iOS app(swift). but when I try to do , like "http://tile.openstreetmap.org/7/63/42.png" first one is zoom, second tileX, third tileY. and I want to convert my latitude and longitude to tileX, tileY. Surely I find https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#X_and_Y this page trying to convert but i'm newbie in iOS(swift) so I can't do that. So conclude, I want to know how to my latitude and longitude to tileX, tileY in "http://tile.openstreetmap.org/7/tileX/tileY.png" if this method is wrong then what can i do for it? thank you for reading my question. asked 18 Oct '16, 10:44 seubseub 11●1●1●2 accept rate: 0% Frederik Ramm ♦ 74.9k●87●675●1157 2 "...but i'm newbie in iOS(swift) so I can't do that." Why not? The article you linked to provides step-by-step calculations you can use to convert from latitude and longitude to the corresponding X and Y. I'm not familiar with Swift. Is it not capable of performing trigonometric operations like tan()? (18 Oct '16, 16:49) alester

### The question has been closed for the following reason "The user has access to the most in-depth wiki page with code samples to answer his question. If this does not help him, he has a general issue with programming that is out of scope here." by Frederik Ramm 19 Oct '16, 23:30

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:

×111
×45
×3
×1

question asked: 18 Oct '16, 10:44

question was seen: 1,337 times

last updated: 19 Oct '16, 23:30