Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
How Vector Maps Work (2019)
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Vladimir Agafonkin
April 08, 2019
Programming
1
500
How Vector Maps Work (2019)
Vladimir Agafonkin
April 08, 2019
Tweet
Share
More Decks by Vladimir Agafonkin
See All by Vladimir Agafonkin
Fast by Default: Algorithmic Optimization in Practice (dotJS 2019)
mourner
0
2.2k
Fast by Default: Algorithmic Optimization in Practice (JSCamp 2019)
mourner
0
640
Fast by default: everyday algorithmic thinking for developers [RU]
mourner
1
550
Fast by default: everyday algorithmic thinking for developers
mourner
1
510
Mapbox GL: How vector maps work
mourner
0
450
Random cool stuff I've been hacking on (mostly spatial indices)
mourner
0
600
Как работают современные интерактивные карты на WebGL
mourner
1
540
Leaflet, WebGL & the Future of Web Mapping
mourner
5
3.5k
How Simplicity Will Save GIS
mourner
10
4.4k
Other Decks in Programming
See All in Programming
あなたはユーザーではない #PdENight
kajitack
4
290
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
180
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
朝日新聞のデジタル版を支えるGoバックエンド ー価値ある情報をいち早く確実にお届けするために
junkiishida
1
280
CSC307 Lecture 14
javiergs
PRO
0
440
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
400
AIに仕事を丸投げしたら、本当に楽になれるのか
dip_tech
PRO
0
170
AIコーディングの理想と現実 2026 | AI Coding: Expectations vs. Reality 2026
tomohisa
0
770
浮動小数の比較について
kishikawakatsumi
0
360
ご飯食べながらエージェントが開発できる。そう、Agentic Engineeringならね。
yokomachi
1
270
20260228_JAWS_Beginner_Kansai
takuyay0ne
4
360
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
400
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
40k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Ruling the World: When Life Gets Gamed
codingconduct
0
160
Automating Front-end Workflow
addyosmani
1371
200k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.3k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
120
Music & Morning Musume
bryan
47
7.1k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
88
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
140
Typedesign – Prime Four
hannesfritz
42
3k
Transcript
how vector maps work Vladimir Agafonkin
None
April 2008
a typical GIS talk
rain.in.ua
so I’m doing maps now, how hard could this be?
None
maps huh? •a bunch of square pictures •drag them with
a mouse •put some icons on top
PFF
Let’s build a mapping library from scratch!
no way you could do that
None
creating a web map in 2008
None
You’re wasting time
None
building from scratch; didn’t tell anyone
None
Web Maps Lite
None
None
born as a protest against bloat, clutter and complexity
None
None
None
None
None
None
None
None
None
None
the number one mapping library in the world* *because the
guy didn’t know shit about maps
•extremely lightweight and simple •extremely easy to get started •huge
community, tons of plugins •stable as a mountain •works everywhere (i.e. legacy browsers)
raster tiles era
OpenLayers
• maps as background • mostly static • top-down, north-oriented
• a rigid set of zoom levels • some simple vectors/icons on top • conceptually the same as 14 years ago Web maps status quo:
None
None
Mapbox vision for maps: living, breathing, fluid, rich, powerful experiences
that make you feel connected to the world Games did it for decades; why not maps?
Evolution of The Elder Scrolls 2002 2006 2011
Evolution of web maps 2002 2006 2011
None
Digital maps before: exclusively web tech Digital maps now: native
mobile apps + web
Browsers before: display a bunch of text and images Browsers
now: anything is possible
vector maps raster maps
let’s build a vector maps platform from scratch!
None
None
None
None
None
None
None
vector maps era
maps.me
why vector maps?
smooth zoom and rotation
None
None
3D features
None
None
None
full control over data presentation in real time
None
None
any object on the map can be interactive
None
None
data-driven styling
None
None
real-time data analysis
None
mourner.github.io/ road-orientation-map
performance: rendering millions of features
None
None
visual map editor
mapbox.com/studio
None
None
None
None
None
None
None
None
less bandwidth
simulation vs cartography?
None
None
github.com/mapbox/ mapbox-gl-js (JS) github.com/mapbox/ mapbox-gl-native (C++14) iOS, Android, QT, Node,
OSX, Linux, Windows
None
None
why isn’t WebGL everywhere yet?
Let’s build something with OpenGL!
OpenGL — 3D API?
OpenGL is a low-level 2D API
None
OpenGL: a technology for drawing triangles really fast
None
drawing lines
None
anti-aliasing
6 triangles
vertex attributes
2 triangles
line joins & line caps
None
drawing polygons
drawing polygons
github.com/mapbox/earcut (JS) github.com/mapbox/earcut.hpp (C++)
drawing text
font textures
unicode-intervals /Arial Regular/0-255.pbf /Arial Regular/256-511.pbf /Arial Regular/512-767.pbf
None
SDF signed distance fields
None
None
None
github.com/mapbox/potpack
mapbox/tiny-sdf
mapbox/ mapbox-gl-rtl-text icu4c C + Emscripten = JavaScript coming soon:
WebAssembly
placing labels
None
mourner/rbush mourner/rbush-knn mourner/kdbush mourner/flatbush mourner/geokdbush mourner/geoflatbush
loading and processing data
mapbox/pbf (JS) mapbox/protozero (C++)
6-7 times faster than JSON.parse Protocol Buffers: 3-4 times smaller
than JSON (gzip)
github.com/mapbox/ vector-tile-spec
mapbox/geojson-vt (JS) mapbox/geojson-vt-cpp (C++)
mapbox/supercluster (JS) mapbox/supercluster-hpp (C++)
mapbox/polylabel (JS, C++)
main thread (UI) processing loading data web workers processing loading
data processing loading data
continuous testing
1082 render tests
mapbox/pixelmatch (JS) mapbox/pixelmatch-cpp (C++)
AppVeyor
hey, what’s there on the server side?
None
the essence of software engineering is mitigation of complexity
vastly bigger scope, same goal: let people build amazing maps
Díky moc! agafonkin.com