Andrew Calcutt
553f58271e
fix: race condition
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:58 -04:00
Andrew Calcutt
a9b5db234f
fix: remove fflate , use zlib like other files
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:58 -04:00
Andrew Calcutt
ee49ad05b8
fix: too many open files
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:57 -04:00
Andrew Calcutt
08b3a943a6
fix: lint
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:57 -04:00
Andrew Calcutt
371e757e5b
fix: add missing semicolon
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:57 -04:00
Andrew Calcutt
8e6fac11a2
fix: remove unused variable
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:57 -04:00
Andrew Calcutt
2c54da134e
fix: make stat variable name more consistent
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:57 -04:00
Andrew Calcutt
d78812d449
fix: simplify other replace
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:57 -04:00
Andrew Calcutt
c4bdf199a7
fix: simplify replace
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:56 -04:00
Andrew Calcutt
18b261c4ad
fix: simplify input file loading
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:56 -04:00
Andrew Calcutt
9cebc4459c
fix: remove unused variables
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:56 -04:00
Andrew Calcutt
93d91b35b9
fix: put back default windows support
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:55 -04:00
Andrew Calcutt
4229a0cb04
fix: bounds and center breaking index image
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:55 -04:00
Andrew Calcutt
1b2b79113b
chore: remove unneeded console.logs
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:54 -04:00
Andrew Calcutt
85290024a9
feat: get maplibre-native to render a png tile
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:54 -04:00
Andrew Calcutt
b2733e2107
chore: remove unused class
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:54 -04:00
Andrew Calcutt
07b0f8b306
fix: put back linux order of sharp and canvas
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:54 -04:00
Andrew Calcutt
c0b30d13be
chore: lint
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:54 -04:00
Andrew Calcutt
c295ae4b6a
feat: add --file option to replace mbtiles
...
Get mbtiles load working again
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:53 -04:00
Andrew Calcutt
9e76cc4a5e
fix: bounds and centerzoom
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:53 -04:00
Andrew Calcutt
4772f0efdc
feat: move pmtiles to it's own file
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:53 -04:00
Andrew Calcutt
ca51104ece
feat: get vector tiles to serve
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:53 -04:00
Andrew Calcutt
61f3306a2d
fix: format, bounds, center
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:53 -04:00
Andrew Calcutt
f7582ba822
feat: move bounds, center, minzoom, maxzoom
...
move into metadata
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:52 -04:00
Andrew Calcutt
47a0c09fd2
feat: read only bytes needed for header and metadata
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:51 -04:00
Andrew Calcutt
f38ba7fe2a
feat: add BufferToArrayBuffer function
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:51 -04:00
Andrew Calcutt
1984c143ac
Revert "feat: failed attempt to load big files"
...
This reverts commit 727187bd7a2327c9df0b62bbf04cfc523554996f.
2023-10-11 13:17:51 -04:00
Andrew Calcutt
b1488c65bc
feat: failed attempt to load big files
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:50 -04:00
Andrew Calcutt
3df423e55f
feat: generate tilejson from pmtiles
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:49 -04:00
Andrew Calcutt
8031f94ca4
feat: move pmtiles reading to utils
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:49 -04:00
Andrew Calcutt
ccd1dbf343
feat: try to read pmtiles file
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-10-11 13:17:49 -04:00
Craig Kochis
d4a5cc6074
Add support for stylized attribution text for static images ( #1005 )
...
* add support for stylized attribution text for static images
* restrict to static opt_mode
* adjust sizes
* chore: fix lint
Signed-off-by: Craig Kochis <cjkochis@gmail.com>
* chore: rename to staticAttributionText
Signed-off-by: Craig Kochis <cjkochis@gmail.com>
* chore: update docs
Signed-off-by: Craig Kochis <cjkochis@gmail.com>
* chore: add staticAttributionText to example config, and run lint
Signed-off-by: Craig Kochis <cjkochis@gmail.com>
---------
Signed-off-by: Craig Kochis <cjkochis@gmail.com>
2023-10-07 20:30:47 -04:00
Andrew Calcutt
7e246d0cd1
fix: lint
...
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-09-27 00:16:54 -04:00
Robin
d759dd2952
fix: incorrect polyline decoding ( #993 )
...
* fix: incorrect polyline decoding
Don't split static image encoded path on pipe or comma
Signed-off-by: boldtrn <boldtrn@gmail.com>
* fix: still allow other parameters other than enc:
That way we can still style individual paths
Signed-off-by: boldtrn <boldtrn@gmail.com>
* chore: lint
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* chore: lint + comment
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* docs: try to clarify path information
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* fix: stroke color not working unless path is specified
i found this issue testing encoded paths. If width is not specifed, stroke color does not work
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* docs: show different options
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
---------
Signed-off-by: boldtrn <boldtrn@gmail.com>
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
Co-authored-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-09-26 23:53:16 -04:00
Robin
c13e5e6821
fix: don't crash the server on processing issues ( #994 )
...
* fix: don't crash the server on processing issues
Use a try/catch for async functions
Signed-off-by: boldtrn <boldtrn@gmail.com>
* chore: run lint
Signed-off-by: boldtrn <boldtrn@gmail.com>
---------
Signed-off-by: boldtrn <boldtrn@gmail.com>
2023-09-26 09:41:29 -04:00
Samuel
02ee629f30
Static images: Allow styling each path differently ( #972 )
...
* fix: allow to style each individual path for static images
Signed-off-by: Samuel Leihkamm <s.leihkamm@gmx.com>
* chore: cleanup drawPath render function
Signed-off-by: Samuel Leihkamm <s.leihkamm@gmx.com>
---------
Signed-off-by: Samuel Leihkamm <s.leihkamm@gmx.com>
2023-09-21 22:55:54 -04:00
fvarga94
13eeeaffad
Resolve composite watermark issue ( #908 )
2023-06-30 12:58:21 -04:00
Nathan Gass
89c6eb7ddf
Use center and zoom from style json ( #507 )
...
* Use center and zoom from style json as default center for tilejson of rendered maps
* Round zoom as style spec allows fractional zooms while tilejson spec does not
2023-03-28 08:46:50 -04:00
zstadler
64adff0855
Handle SIGTERM ( #782 )
...
* Handle SIGTERM
Resolve #781
* Add `Caught signal ...` messages
Container log when sending a `SIGHUP` signal and then a `SIGTERM` signal using
`docker kill --signal ...` :
```
Starting tileserver-gl v4.4.8
[INFO] Automatically creating config file for zurich_switzerland.mbtiles
[INFO] Only a basic preview style will be used.
[INFO] See documentation to learn how to create config.json file.
Run with --verbose to see the config file here.
Starting server
Listening at http://[::]:8080/
Startup complete
Caught signal SIGHUP, refreshing
Stopping server and reloading config
Starting server
Listening at http://[::]:8080/
Startup complete
Caught signal SIGTERM, stopping gracefully
```
Note that the numeric signal values, as used in the shell version, were
replaced by signal names, as used in nodeJS.
* run 'npm run lint:js:fix'
---------
Co-authored-by: acalcutt <acalcutt@techidiots.net>
2023-03-01 10:05:21 -05:00
Manuel Roth
ea186d34df
fix: support for X-Forwarded-Host http header ( #733 )
...
* fix: fix support for overriding hostname by setting X-Forwarded-Host http header
Signed-off-by: Manuel Roth <manuelroth@hotmail.ch>
* fix: improve getUrlObject
Signed-off-by: Manuel Roth <manuelroth@hotmail.ch>
* Add documentation for getUrlObject function
Co-authored-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* Simplify getPublicUrl function
Co-authored-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* Remove variable
Co-authored-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* Use urlObject directly
Co-authored-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* fix: small fix
Signed-off-by: Manuel Roth <manuelroth@hotmail.ch>
---------
Signed-off-by: Manuel Roth <manuelroth@hotmail.ch>
Co-authored-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
2023-01-31 20:35:16 -05:00
Daniel Kao
f94625ab05
fix: fix vectortile constructor ( #723 )
...
Signed-off-by: Daniel Kao <dkao@diplateevo.com>
Signed-off-by: Daniel Kao <dkao@diplateevo.com>
2023-01-20 17:41:18 -05:00
Vinayak Kulkarni
bb0cd60e64
feat: enable Google Polyline in Static Images endpoint 🕺 ( #648 )
...
* docs: update `encodedpath` documentation
Co-Authored-By: Niklas Hösl <nik.hoesl@hotmail.com>
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* feat: enable `encodedpath` in query to load encoded polyline
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* refactor!: update static map endpoint `path`
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* chore: remove `console.log()`
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* docs: remove `encodedpath` arg
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* revert: docs update
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* chore(deps): add `@mapbox/polyline` dep
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* chore(deps): add `@mapbox/polyline` dep
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* fix: enable default `stroke`
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* docs: update documentation
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* test: decode URI component
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* fix: drawPath method
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* fix: safely decode URI Component
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* fix: enable multiple paths while extracting them from query
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* fix: lockfile conflict
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
Co-authored-by: Niklas Hösl <nik.hoesl@hotmail.com>
2023-01-12 15:48:43 -05:00
Andrew Calcutt
138ac04676
allow tileMargin option ( #694 )
...
* allow tileMargin option
tile mode does not support more than one tile in maplibre-native, so tileMargin needs static mode to work.
* add space
2023-01-05 14:13:26 -05:00
Michael Nutt
a7af45ee3f
fix: Ensure font serving does not reflect userdata-derived errors as HTML ( #647 )
...
* fix: ensure font serving does not reflect userdata-derived errors as HTML
Signed-off-by: Michael Nutt <michael@nuttnet.net>
2022-11-24 11:07:11 -05:00
Andrew Calcutt
c134795b81
change docker to use port 8080 by default ( #638 )
...
* change docker to use default 8080 port
2022-11-20 23:00:41 -05:00
Vinayak Kulkarni
9b64093c42
style: fix lint issues in code 🕺 ( #626 )
...
* style: fix lint issues in code 🕺
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* style: lint fix all files
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* chore: add `keywords` for better reach
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* feat: add `husky` & `commitlint`
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* chore: ignore `public` directory
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* revert: do not lint `public` directory
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* style: fix issues with lint
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* feat: add eslint config
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* feat: add lint-staged
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* style: lint fix all file(s)
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* fix: ignore rules for light version
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* fix: remove unnecessary space
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* chore(deps): update lockfile
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* style: autofix linting issue(s)
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
2022-11-08 22:56:07 -05:00
zstadler
50201f0a99
Add Docker Healthcheck ( #636 )
...
* Add Docker Healthcheck
Fixes #635
* Update Dockerfile_light
* Update healthcheck.js
fix healthcheck output error: "file:///usr/src/app/src/healthcheck.js:1\nvar http = require(\"http\");\n ^\n\nReferenceError: require is not defined in ES module scope, you can use import instead\nThis file is being treated as an ES module because it has a '.js' file extension and '/usr/src/app/package.json' contains \"type\": \"module\". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.\n at file:///usr/src/app/src/healthcheck.js:1:12\n at ModuleJob.run (node:internal/modules/esm/module_job:193:25)\n at async Promise.all (index 0)\n at async ESMLoader.import (node:internal/modules/esm/loader:526:24)\n at async loadESM (node:internal/process/esm_loader:91:5)\n at async handleMainPromise (node:internal/modules/run_main:65:12)\n"
* update version
Co-authored-by: acalcutt <acalcutt@techidiots.net>
2022-11-06 21:30:55 -05:00
Andrew Calcutt
212af8145c
fix canvas import ( #631 )
2022-10-28 19:04:20 -04:00
Andrew Calcutt
b6e2d101eb
Fix HUP kill not reloading config ( #630 )
...
* try to fix HUP config reset
* remove..outdated?.. require.cache
2022-10-28 11:53:21 -04:00
benedikt-brandtner-bikemap
f3f63498a8
Extended Static-Images Endpoint ( #619 )
...
* extended staticmap capabilities
* added allowRemoteMarkerIcons configuration option and restricted fetching of remote marker icons only when option is set to true;
asynchronously load all available icons in a settings object on server startup;
replaced fs.existsSync() call in serve_rendered when drawing marker icons with a check against available icons settings object;
* updated documentation for linecap parameter in staticmaps endpoint;
added linejoin parameter to staticmaps endpoint;
* added capability of staticmap endpoint to draw multiple paths
2022-10-27 22:55:46 -04:00