Mapzen Vector Tiles
Vector tiles let you draw better maps
Mapzen’s vector tile service delivers worldwide coverage of OpenStreetMap base layer data, and is available in GeoJSON, TopoJSON, and MVT binary format. Our vector tiles can be displayed via a number of open technologies, including SVG via D3, OpenLayers, and WebGL.
What is a Vector Tile?
Instead of a web server sending you a pre-drawn image tile, a vector tile contains the OSM geometry for a particular part of the earth, delivered on demand. It contains instructions on what can be drawn, rather than something already drawn and styled. Below is a snippet of a vector tile in GeoJSON; as you can see it contains mathematical descriptions and metadata of buildings, roads and other features in the OSM base layer.
(Mapzen vector tiles can also be exported as TopoJSON, which when compressed is usually smaller than corresponding image files or binary formats. More details on formats are included in the documentation.)
How to draw the tile is up to the vector-friendly visualization tool (usually SVG or WebGL) in the web browser. Buildings and roads can be rendered in different ways (or not at all) once the vector tile is downloaded — no need to head back to the server and fetch a different set of tiles if you want to filter the output. There’s no need to re-render millions of tiles if you change your mind about the style of a road or the color of a building.
Why Vector Tiles?
Vector tiles allows for more efficient downloads and more rapid map updates than pre-rendered raster tiles that you might be used to. When changes are made to the OSM base layer, rather than waiting for an image tile to be redrawn, only the coordinates and drawing instructions for that particular building or road need to be updated. Depending on the URL syntax, vector tiles can return all of the OSM data, or just individual layers, or combinations of layers, including water, earth, landuse, roads, buildings and points of interest.
While it requires an API key, our vector tile service has generous rate limits and licensing. Our goal is to keep this free for small to mid-sized developers and businesses to make (and sell!) cool and interesting products and apps using our tiles. We only ask that you not resell our raw vector tiles as your own.
If you have any questions, please contact us. And you should contact us anyway, because we want to hear what people are trying to do.
The Mapzen vector tile server uses the familiar slippy tile
zoom/x/y URL format:
One or more
layers can be specified in the URL –
all returns everything, while other layer names filter the geometry that is delivered:
water are but a few examples. Multiple
layer names can be combined in the URL, such as
roads,water. See the technical documentation for a list of available layers.
Select the tile
format in the URL. Multiple human readable and binary options are available:
- GeoJSON (human readable, widely used):
- TopoJSON (smaller than GeoJSON, shared line segments):
- Mapbox Vector Tiles (protocol buffer):
Mapzen Vector Tiles can be displayed in a number of visualization technologies in addition to our Tangram WebGL renderer. We have created public examples of how to them in four browser technologies: Mapzen’s Tangram, D3, OpenLayers, and MapboxGL.
Tangram is Mapzen’s WebGL mapping engine designed for real-time rendering of 2D and 3D maps from vector tiles. More details are available on the Tangram home page as well in the Tangram documentation.
More detail on all of these implementations is available in the documentation.
These are some of our favorite uses of our vector tiles!