You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: basemaps/downloads.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ Please note that **URLs may change** and hotlinking to these downloads are disco
18
18
19
19
## Current Version
20
20
21
-
The Version 4 Protomaps basemap daily build channel is available at [maps.protomaps.com/builds](https://maps.protomaps.com/builds). This is compatible with `protomaps-themes-base` style v4.0.0 and newer.
21
+
The Version 4 Protomaps basemap daily build channel is available at [maps.protomaps.com/builds](https://maps.protomaps.com/builds). This is compatible with `@protomaps/basemaps` style v4.0.0 and newer.
22
22
23
23
[BLAKE3](https://github.com/BLAKE3-team/BLAKE3/releases/) hashes are provided for daily builds. Use `b3sum` to verify the integrity of your downloaded file.
These examples use the preferred [MapLibre GL JS](/basemaps/maplibre) library.
13
+
14
+
The `Flavor` TypeScript interface is the preferred way to customize the basemap style. See the shape of the interface at the [@protomaps/basemaps TypeScript docs](https://maps.protomaps.com/typedoc/interfaces/Flavor.html).
15
+
16
+
A `Flavor` is a plain object of color definitions and optional properties such as font names, landcover shades and POI properties. You can define a `Flavor` yourself for a custom style, similar to a text editor color scheme, or use one of the default named flavors as a base.
17
+
18
+
## Default Flavors
19
+
20
+
These flavors are included as part of the `@protomaps/basemaps` package.
Use [ES6 spread syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax) to override any part of the Flavor object. For example, to color buildings red:
55
+
56
+
```ts
57
+
import { namedFlavor } from"@protomaps/basemaps"
58
+
let flavor = {...namedFlavor("light"),buildings:"red")
@@ -36,20 +36,20 @@ These are required for townspots, highway shields and point of interest icons.
36
36
37
37
## Loading styles as JSON
38
38
39
-
Because [MapLibre styles](https://maplibre.org/maplibre-style-spec/) are JSON documents, the simplest way to define a style in your application is with static JSON. You can use the `Get style JSON` feature of [maps.protomaps.com](https://maps.protomaps.com) to generate static JSON for a specific theme and style package version.
39
+
Because [MapLibre styles](https://maplibre.org/maplibre-style-spec/) are JSON documents, the simplest way to define a style in your application is with static JSON. You can use the `Get style JSON` feature of [maps.protomaps.com](https://maps.protomaps.com) to generate static JSON for a specific flavor and style package version.
40
40
41
41
## Creating styles programatically
42
42
43
-
For more control and less code, you can add use the [`protomaps-themes-base`](https://www.npmjs.com/package/protomaps-themes-base) NPM package as a dependency.
43
+
For more control and less code, you can add use the [`@protomaps/basemaps`](https://www.npmjs.com/package/@protomaps/basemaps) NPM package as a dependency.
@@ -129,7 +129,7 @@ Below is a complete example of a map application that avoids third-party data pr
129
129
130
130
*`maplibre-gl.js`, `maplibre-gl.css` - JavaScript and CSS for the MapLibre GL rendering library.
131
131
*`pmtiles.js` - JavaScript for decoding PMTiles archives in the browser.
132
-
*`protomaps-themes-base.js` - JavaScript for creating a MapLibre GL style for a basemap tileset.
132
+
*`basemaps.js` - JavaScript for creating a MapLibre GL style for a basemap tileset.
133
133
*`mapbox-gl-rtl-text.min.js` - MapLibre plugin for supporting right-to-left languages.
134
134
*`fonts/{fontstack}/{range}.pbf` - Font glyphs for rendering labels, available at [protomaps/basemaps-assets](https://github.com/protomaps/basemaps-assets).
135
-
*`sprites/{version/{theme}` - Sprites for basemap icons, available at [protomaps/basemaps-assets](https://github.com/protomaps/basemaps-assets).
135
+
*`sprites/{version/{flavor_name}` - Sprites for basemap icons, available at [protomaps/basemaps-assets](https://github.com/protomaps/basemaps-assets).
0 commit comments