Remix.run Logo
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 | parent | next [-]

>Vector tiles are not new technology.

Yeah, it really is not. Mapbox Vector Tiles spec came out in 2014, and they've been absolutely standard across all (non-government) web mapping for at least the last 5 years.

gregoriol 2 days ago | parent | next [-]

Indeed almost everyone except Apple's MapKit library for in-app native maps integration is using vector these days.

hopelite 2 days ago | parent [-]

Could you explain why you say that? My understanding is that rasterized tiles are only a graceful degradation when necessary in MapKit, while vector is default, as the behavior and experience would indicate.

gregoriol a day ago | parent [-]

I was referring to using custom vector tiles like the ones in the post with MapKit, not Apple's tiles. The MKTileOverlay is the only way to do it and it only supports bitmap tiles.

showcaseearth 2 days ago | parent | prev [-]

+1. Google launched their (proprietary) vector tiles in 2013 as well, and I'd even argue that vector has been the standard well over 5 years now.

awkward 2 days ago | parent | prev [-]

Tiles aren't just about data selection, they're also about caching. By turning a continuous domain (any part of the world at any scale) into a series of discrete requests (a grid of tiles at several fixed scales), maps become a series of cacheable requests.