From f94f955f675ea6944b773551fe6ba03ef9d7a4fb Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Wed, 21 Feb 2024 17:12:46 +0800 Subject: [PATCH] Update downloads and leaflet docs (#27) --- basemaps/downloads.md | 20 ++++++++++---------- basemaps/leaflet.md | 21 ++++++++++++++++++--- pmtiles/leaflet.md | 28 ++++++---------------------- 3 files changed, 34 insertions(+), 35 deletions(-) diff --git a/basemaps/downloads.md b/basemaps/downloads.md index af23f6e..78dd317 100644 --- a/basemaps/downloads.md +++ b/basemaps/downloads.md @@ -9,27 +9,27 @@ outline: deep The **Protomaps Basemap** is a general purpose vector *base map* - city labels, roads, water features and other essential location context derived from [OpenStreetMap](https://openstreetmap.org). It's available as a single PMTiles archive, distributed as an [Open Database License](https://opendatacommons.org/licenses/odbl/) Produced Work (OpenStreetMap attribution required) +A full planet file is roughly **120 gigabytes**, including zoom levels from 0 to 15. + +Please note that **URLs may change** and hotlinking to these downloads are discouraged. Instead, you should copy the tileset to your own [Cloud Storage](/pmtiles/cloud-storage). + +* The generation of the planet basemap is open source at [github.com/protomaps/basemaps](http://github.com/protomaps/basemaps). + + ## Current Version The Version 3 Protomaps basemap daily build channel is available at [maps.protomaps.com/builds](https://maps.protomaps.com/builds). -A mirror in the AWS `us-west-2` is available on [Source Cooperative (beta)](https://beta.source.coop) at the [protomaps/openstreetmap](https://beta.source.coop/repositories/protomaps/openstreetmap/) repository. This mirrors the recent build only. +A mirror in the AWS `us-west-2` is available on [Source Cooperative (beta)](https://beta.source.coop) at the [protomaps/openstreetmap](https://beta.source.coop/repositories/protomaps/openstreetmap/) repository. This mirrors the most recent daily build only. ## Partial Downloads To download a cutout of a specific region, rather than the entire world map, see the CLI's [extract command](/pmtiles/cli#extract). +If you don't need all 16 zoom levels of detail, use the `--maxzoom` option of `pmtiles extract`. Each additional zoom level roughly doubles the size of the file. + ## Previous Version The version 2 basemap is `protomaps-basemap-opensource-20230408.pmtiles` -The [protomaps-leaflet](https://github.com/protomaps/protomaps-leaflet) Leaflet plugin currently uses this basemap version. - -You can download the planet archive at this link (⚠ file is over 100GB): - [https://r2-public.protomaps.com/protomaps-sample-datasets/protomaps-basemap-opensource-20230408.pmtiles](https://r2-public.protomaps.com/protomaps-sample-datasets/protomaps-basemap-opensource-20230408.pmtiles) - -Please note that this **URL may change** and hotlinking to it is discouraged. Instead, you should copy the tileset to your own [Cloud Storage](/pmtiles/cloud-storage). - -* The generation of the planet basemap is open source at [github.com/protomaps/basemaps](http://github.com/protomaps/basemaps). - diff --git a/basemaps/leaflet.md b/basemaps/leaflet.md index 9bfbc46..80962c6 100644 --- a/basemaps/leaflet.md +++ b/basemaps/leaflet.md @@ -5,6 +5,21 @@ outline: deep # Basemaps for Leaflet -::: warning -This section is under construction. -::: \ No newline at end of file +The simplest way to include a map in your application via script includes tag: + +```js +// check for the latest version on github... + + +``` + +## Themes + +The `theme` option must be one of `light`, `dark`, `white`, `grayscale`, `black`. + +This will assume the set of basemap layers described at [Basemap Layers](/basemaps/layers). + diff --git a/pmtiles/leaflet.md b/pmtiles/leaflet.md index 4db362a..ddeec89 100644 --- a/pmtiles/leaflet.md +++ b/pmtiles/leaflet.md @@ -22,31 +22,15 @@ const p = new PMTiles('https://example.com/data.pmtiles'); leafletRasterLayer(p).addTo(map) ```` -## Vector: protomaps-leaflet +## Vector PMTiles Protomaps publishes a lightweight Leaflet plugin, [protomaps-leaflet](https://github.com/protomaps/protomaps-leaflet), that implements **vector drawing and text labels** built on the Canvas API and Web Fonts. -:::warning -Note: the protomaps-leaflet default style uses the Protomaps [Basemap tileset verson 2.](/basemaps/downloads) -::: +Note that the protomaps-leaflet library is **designed for non-interactive layers**, because it renders vector tiles to Canvas (image) elements. -## Vector Basemaps +For basemap display as a substitute for server-rendered tiles, see [Basemaps for Leaflet](/basemaps/leaflet). -The simplest way to include a map in your application via script includes tag: - -```js -// check for the latest version on github... - - -``` - -By default, this will assume the set of basemap layers described at [Basemap Layers](/basemaps/layers), so you should see a map that looks like this: - -![detroit](https://protomaps.github.io/protomaps-leaflet/benchmark/example_1.png) +For fully interactive vector overlay tiles you should use [MapLibre GL JS](/pmtiles/maplibre). ## Custom Vector Data @@ -70,8 +54,8 @@ let LABEL_RULES = []; // ignore for now protomapsL.leafletLayer({ url:URL, - paint_rules:PAINT_RULES, - label_rules:LABEL_RULES + paintRules:PAINT_RULES, + labelRules:LABEL_RULES }).addTo(map) ```