NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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's gravatar image

seubseub
11112
accept rate: 0%

closed 19 Oct '16, 23:30

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273

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

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • 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:

×113
×50
×3
×1

question asked: 18 Oct '16, 10:44

question was seen: 2,099 times

last updated: 19 Oct '16, 23:30

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum