Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
How Vector Maps Work (2019)
Search
Vladimir Agafonkin
April 08, 2019
Programming
520
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
How Vector Maps Work (2019)
Vladimir Agafonkin
April 08, 2019
Transcript
145 slides
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
More Decks by Vladimir Agafonkin
See All by Vladimir Agafonkin
Fast by Default: Algorithmic Optimization in Practice (dotJS 2019)
mourner
0
2.3k
Fast by Default: Algorithmic Optimization in Practice (JSCamp 2019)
mourner
0
690
Fast by default: everyday algorithmic thinking for developers [RU]
mourner
1
580
Fast by default: everyday algorithmic thinking for developers
mourner
1
550
Mapbox GL: How vector maps work
mourner
0
500
Random cool stuff I've been hacking on (mostly spatial indices)
mourner
0
640
Как работают современные интерактивные карты на WebGL
mourner
1
580
Leaflet, WebGL & the Future of Web Mapping
mourner
5
3.5k
How Simplicity Will Save GIS
mourner
11
4.7k
Other Decks in Programming
See All in Programming
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
310
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
250
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
220
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
320
AI Augmentation Techniques with Liberty
ivargrimstad
1
490
느린 네트워크와 저사양 디바이스 사용자를 위한 웹뷰 로딩 시간 개선기
kmkim
1
240
疎結合とは何か?ソフトウェア設計における結合バランスについて考える #phpcon_niigata
kajitack
0
170
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
130
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
330
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
270
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
210
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
110
Featured
See All Featured
Claude Code のすすめ
schroneko
67
230k
Rails Girls Zürich Keynote
gr2m
96
14k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
470
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.9k
Crafting Experiences
bethany
1
440
Paper Plane
katiecoart
PRO
6
55k
Context Engineering - Making Every Token Count
addyosmani
9
1.3k
Producing Creativity
orderedlist
PRO
348
41k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
940
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
610
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
520