The Protomaps Map API is a hosted, CDN-accelerated web service for interactive maps on the web. The Map API serves square Web Mercator tiles based on the MVT Vector Tiles specification : vector-tile-spec
The Protomaps Map API is under heavy development.
The URL for accessing map tiles is:
https://api.protomaps.com/tiles/v1/{z}/{x}/{y}.pbf?key=<YOUR API KEY>
Other assets such as JavaScript Libraries, map styles, and fonts, can be included from the cdn.protomaps.com
subdomain. These requests do not need an API key.
Examples:
https://cdn.protomaps.com/leaflet/1.6.0/leaflet.css
https://cdn.protomaps.com/leaflet/1.6.0/leaflet.js
https://cdn.protomaps.com/tangram/0.21.0/tangram.min.js
https://cdn.protomaps.com/styles/0.0.3/light.yml
Protomaps vector tiles are organized into the following layers:
pmap:kind
key, which is one of highway, majorroad, mediumroad, minor_road, otherA map rendering library is needed to display interactive maps on the web. The Protomaps Map API is designed to work with any renderer that supports MVT format tiles, including:
To use TangramJS, embed on your page:
<link rel="stylesheet" href="https://cdn.protomaps.com/leaflet/1.6.0/leaflet.css" />
<script src="https://cdn.protomaps.com/leaflet/1.6.0/leaflet.js"></script>
<script src="https://cdn.protomaps.com/tangram/0.21.0/tangram.min.js"></script>
See light.yml for an example on how to style a Tangram map based on these layers. More documentation is forthcoming.
To use MapLibre GL JS, embed on your page:
<link rel="stylesheet" href="https://cdn.protomaps.com/maplibre-gl-js/1.13.0pm1/mapbox-gl.css" crossorigin="anonymous">
<script src="https://cdn.protomaps.com/maplibre-gl-js/1.13.0pm1/mapbox-gl.js" crossorigin="anonymous"></script>
A library of styles for the MapboxGL renderer is coming soon. For an example of a "debug" map that renders each feature in its own color, see debug.json.
Coming soon
© 2020 Protomaps