Live data from Hacker News

I built a vector map from scratch

ckochis.com

41–43 of 43 posts

Re: I built a vector map from scratch

#41
I've been digging deep into the MapLibre GL Native source code this week to understand how it is built, and it turned out to be a huge and very complex project.

Yesterday I was wondering how hard it would be to implement a custom map which makes use of vector and raster tiles, and here is an article which is basically a step-by-step tutorial on how to build one.

Wow! It is amazing, very succinct and well-written, congratulations and thanks for sharing!

Re: I built a vector map from scratch

#43
post #21

Nice tutorial! Brace yourself for the next step (text rendering and label placement) — this is way more difficult than it may seem at first, and contributes to a lot of complexity in Mapbox GL JS.

Yeah, that’s precisely why I didn’t tackle that. I was wondering though, does it render text in GL on the web, or leverage the DOM? (I’m just using absolute positioning for the tile labels)

It renders in WebGL with SDFs, but rendering is a small part of the problem — placing labels along paths including curved ones, avoiding collisions etc. gets very complex very fast.
Post reply on HN