Vector Tiles are deployed on OpenStreetMap.org

blog.openstreetmap.org

277 points by ikawe 4 days ago


ikawe - 3 days ago

Background:

Mapping applications split up data into "tiles" so you can download only the data you are currently looking at. For example, you don't want to download the entire planet, just to look at your own neighborhood.

Historically, these tiles were literally images that the client application (i.e. web map) could "tile" side by side to cover the part of the map you were looking at. Now we refer to those images as "raster" tiles, to differentiate them with "vector" tiles.

Rather than a rendered image, Vector tiles contain the raw data that you could use to render such an image. Vector tiles allow a smaller file size and more flexibility. For example, with vector tiles you can crisply render at partial zoom levels, keeping lines sharp and avoid pixelating text. The client can also have customizable styles - hiding certain layers or accentuating others from the vector tiles.

Vector tiles are not new technology. For example, Google Maps started using them over a decade ago. So why has it taken so long for OpenStreetMap.org? One reason is no doubt a lack of engineering capacity. There were also concerns about older and less powerful clients hardware not being up to the task, but that concern has lessened over time.

OpenStreetMap also has some unique requirements. It is a community edited database, and users want to see their edits soon (immediately really). It's not feasible to dynamically generate every tile request from the latest data, so caching is essential. Still, to minimize the amount of time tiles will be stale, a lot of work went into being able to quickly regenerate stale tiles before the new vector tiles were rolled out.

stevage - 3 days ago

For anyone who wants to actually try the new layer, it's called "Shortbread" and can be accessed under the layers selector. Or use this link: https://www.openstreetmap.org/#map&layers=S

The blog post could do a better job of surfacing that bit!

You can compare it to the existing vector tile layer created by MapTiler, which mimics the classic raster tile style: https://www.openstreetmap.org/#map&layers=V

severak_cz - 2 days ago

Oh but that default style for Shortbread is so ugly! No contrast, missing details and lots of information lost.

Hopefully it's vector tiles and information are there (I checked in Maputik) so it's possible to create my own style (which I will definitely try).

maelito - 3 days ago

In case you wonder how much time / resources it takes to generate vector tiles, I'm running benchmarks with Tilemaker here for https://cartes.app

https://github.com/systemed/tilemaker/issues/839

dolmen - 2 days ago

Many important details are not visible anymore:

  - gates on private pathways 
  - shop names
amluto - 2 days ago

What happened to maps trying to make the names of most or all streets visible? It looks like the vector layer on the web viewer is sort of trying to show some street names, but it seems extremely buggy right now — names appear and then disappear again when making small zoom adjustments.

Not that Apple Maps or Google Maps are much better in this regard.

colkassad - 3 days ago

What's the impediment to not providing daily or weekly planet-wide mbtiles similar to the availability of OSM pbfs on AWS open data buckets[1]?

[1] https://registry.opendata.aws/osm/

butz - 2 days ago

While vector tiles are often marketed as faster loading ones, and it is true in OSM case, I would like to see apples to apples comparison: vector tiles with same level of detail as original OSM raster tiles. Maybe someone already has such vector style built?

perrygeo - 2 days ago

To everyone with complaints about the new "Shortbread" styling, I agree that it's not perfect but that's kinda missing the point. The real story is that vector tiles have the styling applied client-side so anyone can tweak the look with a little javascript.

The prior raster tiles have the style baked in; if you want a new look, you need to generate a new image. So each map publisher ends up running their own data and server infrastructure just to tweak the style.

The vector tile approach means a single (cacheable) asset can be used in many different maps. Huge win. If you don't like the style, you can make your own without having to literally download the planet.

neomantra - 2 days ago

This comment is a reminder that OSM Vector Tiles is sponsored work. It is exciting to see the deployment of it — congrats to the team!

If you find value in it, consider donating any amount to the OpenStreetMap Foundation.

https://blog.openstreetmap.org/2024/02/11/2024-announcing-th...

davidkwast - 4 days ago

Nice. I already use Vector Tiles on my backend. But it is nice to have other sources like this.

eulgro - 4 days ago

I had no idea what vector tiles were and the page doesn't explain it.

https://en.wikipedia.org/wiki/Vector_tiles

wiz21c - 2 days ago

does a vector tile use more or less memory than a raster tile ? I mean, on average, in OSM.