iwtlp.com

How a map works, Mercator, tiles, and your GPS pin (opens in new tab)

Discussed on DEV

You drag a map, it loads more map. You drop a pin, it lands exactly where you tapped. This feels like one seamless thing, but underneath, every "slippy map", Google Maps, OpenStreetMap, the map in a thousand apps, is built from two pieces of math: a way to flatten a round Earth onto a flat screen, and a way to chop that flat image into loadable squares. Both fit in a few lines of Python. Learn them and your blue dot stops being magic: you will be able to take a latitude and longitude and comp...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help