Skip to content

Commit ebdf632

Browse files
guerdawipfli
andauthored
doc(security-privacy.md): advice to use absolute URLs for glyphs and … (#118)
* doc(security-privacy.md): advice to use absolute URLs for glyphs and sprites in GDPR example * doc(security-privacy.md): use better name for MapLibre Co-authored-by: Oliver Wipfli <oliver.wipfli@leichteralsluft.ch> * doc(security-privacy.md): fix typo --------- Co-authored-by: Oliver Wipfli <oliver.wipfli@leichteralsluft.ch>
1 parent 2d9ac11 commit ebdf632

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

guide/security-privacy.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ Below is a complete example of a map application that avoids third-party data pr
109109
zoom: 12,
110110
center: [11.24962,43.77078],
111111
style: {
112-
glyphs: "fonts/{fontstack}/{range}.pbf",
113-
sprite: "sprites/v4/light",
112+
glyphs: "https://example.com/fonts/{fontstack}/{range}.pbf",
113+
sprite: "https://example.com/sprites/v4/light",
114114
version: 8,
115115
sources: {
116116
protomaps: {
@@ -131,5 +131,7 @@ Below is a complete example of a map application that avoids third-party data pr
131131
* `pmtiles.js` - JavaScript for decoding PMTiles archives in the browser.
132132
* `basemaps.js` - JavaScript for creating a MapLibre GL style for a basemap tileset.
133133
* `mapbox-gl-rtl-text.min.js` - MapLibre plugin for supporting right-to-left languages.
134-
* `fonts/{fontstack}/{range}.pbf` - Font glyphs for rendering labels, 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).
134+
* `https://example.com/fonts/{fontstack}/{range}.pbf` - Font glyphs for rendering labels, available at [protomaps/basemaps-assets](https://github.com/protomaps/basemaps-assets).
135+
* `https://example.com/sprites/{version/{flavor_name}` - Sprites for basemap icons, available at [protomaps/basemaps-assets](https://github.com/protomaps/basemaps-assets).
136+
137+
The URLs for glyphs and sprites must be absolute, in order to load the ressources correctly. This is due to the [behavior of MapLibre](https://github.com/maplibre/maplibre-gl-js/issues/182).

0 commit comments

Comments
 (0)