map-glyph-server
v1.1.10
Published
Server for glyph/font files compatible with mapbox-gl-js
Downloads
62
Maintainers
Readme
map-glyph-server
Server for glyph/font files compatible with mapbox-gl-js
Install
$ npm install --global map-glyph-server
Environment
The following environment variables are used by map-glyph-server
MAP_GLYPH_SERVER_FONT_PATH
- needs to specify the location of the fonts filesMAP_GLYPH_SERVER_PORT
- local port to whichmap-glyph-server
binds to default: 3060MAP_GLYPH_SERVER_CACHE_MAX_AGE
- if specified used as amax-age
value of theCache-Control
header when serving font/pbf files (maximum amount of seconds a resource is considered fresh)
/etc/default/map-glyph-server
can be used to set environment variables
Usage
Prior to starting the server glyphs should be located in MAP_GLYPH_SERVER_FONT_PATH
directory. This can
be achieved using openmaptiles/fonts or a similar utility.
In order to use the fonts edit Style JSON and change the endpoint for glyphs:
"glyphs": "https://fonts.example.com/fonts/{fontstack}/{range}.pbf",
License
MIT © Damian Krzeminski