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
Vladimir Agafonkin
April 08, 2019
Programming
1
430
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
2k
Fast by Default: Algorithmic Optimization in Practice (JSCamp 2019)
mourner
0
470
Fast by default: everyday algorithmic thinking for developers [RU]
mourner
1
370
Fast by default: everyday algorithmic thinking for developers
mourner
1
460
Mapbox GL: How vector maps work
mourner
0
350
Random cool stuff I've been hacking on (mostly spatial indices)
mourner
0
530
Как работают современные интерактивные карты на WebGL
mourner
1
500
Leaflet, WebGL & the Future of Web Mapping
mourner
5
3.3k
How Simplicity Will Save GIS
mourner
10
4.2k
Other Decks in Programming
See All in Programming
CRE Meetup!ユーザー信頼性を支えるエンジニアリング実践例の発表資料です
tmnb
0
580
ベクトル検索システムの気持ち
monochromegane
30
9.6k
AtCoder Heuristic First-step Vol.1 講義スライド(山登り法・焼きなまし法編)
takumi152
4
1k
AIコードエディタの基盤となるLLMのFlutter性能評価
alquist4121
0
180
Preact、HooksとSignalsの両立 / Preact: Harmonizing Hooks and Signals
ssssota
1
1.1k
List とは何か? / PHPerKaigi 2025
meihei3
0
590
AIコーディングワークフローの試行 〜AIエージェント×ワークフローでの自動化を目指して〜
rkaga
2
2.2k
Going Structural with Named Tuples
bishabosha
0
190
OpenTelemetryを活用したObservability入門 / Introduction to Observability with OpenTelemetry
seike460
PRO
1
400
爆速スッキリ! Rspack 移行の成果と道のり - Muddy Web #11
dora1998
1
260
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
760
国漢文混用体からHolloまで
minhee
1
130
Featured
See All Featured
Facilitating Awesome Meetings
lara
53
6.3k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Making the Leap to Tech Lead
cromwellryan
133
9.2k
GraphQLとの向き合い方2022年版
quramy
45
14k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
22
2.6k
How to Ace a Technical Interview
jacobian
276
23k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Into the Great Unknown - MozCon
thekraken
36
1.7k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.5k
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