* handle local geojson files in styles and rendered tiles
- use 'file://' as indicator for local files
- add directory as default directory
- serve local files at
- add documentation for static file serving
- add some minor fixes (icon directory, directory checking, decodeURIComponent, extend error message)
* Update .gitignore
---------
Co-authored-by: Miko <miko@home-laptop.fritz.box>
Co-authored-by: Andrew Calcutt <acalcutt@techidiots.net>
* fix: allow sprite array in styles
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* fix: add 'sprite/' to generated path
So it doesn't conflict with style json url
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* fix: allow old sprite endpoints to work
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* fix: lint
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* docs: add multi-sprite name to endpoint
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* fix: duplicate styleJSON.sprite
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* fix: try to fix some codeql errors
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* fix: try to fix some codeql errors
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* fix: try to fix some codeql errors
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* fix: try to fix some codeql errors
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* fix: try to fix some codeql errors
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* fix: lint
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* fix: ci sprite issue
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* fix: remove console.log's
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
* fix: use sprite id instead of name
Signed-off-by: acalcutt <acalcutt@techidiots.net>
* fix: add suggestions
Signed-off-by: acalcutt <acalcutt@techidiots.net>
* fix: remove unneeded array check
Signed-off-by: acalcutt <acalcutt@techidiots.net>
* fix: lint
Signed-off-by: acalcutt <acalcutt@techidiots.net>
* fix: don't force multi-sprites in style
Signed-off-by: acalcutt <acalcutt@techidiots.net>
* fix: move fixUrl and allowedOptions to utils
Signed-off-by: acalcutt <acalcutt@techidiots.net>
* fix: add test for default sprite
Signed-off-by: acalcutt <acalcutt@techidiots.net>
* fix: lint
Signed-off-by: acalcutt <acalcutt@techidiots.net>
---------
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
Signed-off-by: acalcutt <acalcutt@techidiots.net>
Root cause: modified regex in #1002 caused URLs to be broken.
Fixed by reverting previous regexes.
Tests:
* Confirmed by building and running locally with formerly breaking config.json and style json.
* Run tests via Dockerfile_test
Adds pmtiles support to TileServer-GL
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
Signed-off-by: Michael Nutt <michael@nuttnet.net>
Co-authored-by: Michael Nutt <michael@nuttnet.net>
* chore: cleanup useless decodeURIComponent() calls
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
* chore: try to fix CodeQL failure "Polynomial regular expression"
Fix 1:
\d\.?\d* can backtrack catastrophically
\d(\.\d*)? is safer
Fix 2:
Useless parenthesis around "enc:"
Fix 3:
The httpTester regex was misleading. It did not really check for "http".
Simplified to show its true meaning. The behaviour should not have changed.
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
* chore: try to optimize the regex further, to fix CodeQL failure
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
* chore: consistency between previous changes, docs, and serve_style.js
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
---------
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
* switch to esm module
* Update package.json
* change to maplibre package
* fix tests
* eslint
* remove extra package updates
* Delete package-lock.json
* change 'fs' to 'node:fs'
* put back node 10.
without the package updates this still works
* remove trailing commas
* remove unassociated fix / formatting
* remove unassociated fix
* remove eslint from this PR
* remove unassociated fix
* lint
* Merge remote-tracking branch 'upstream/master' into esm_update
* fix mlgl
* update maplibre-native to new version with arm64
* update minor version
* var -> let / const
* [].forEach -> for (... of ...)
* '...' + var -> template strings `...${var}`
* function -> arrow functions `=>`
* use === and !== instead of == and !=