Commit Graph

16 Commits

Author SHA1 Message Date
Martin d'Allens
e8f64e2861
chore: cleanup useless decodeURIComponent() calls (#1002)
* 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>
2023-10-13 19:08:28 -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
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
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
Andrew Calcutt
b2bd5eaa96
Convert to esm module syntax (#606)
* 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
2022-09-28 14:41:55 -04:00
Petr Sloup
1c401f41a2 Update tests and links to use the new data 2016-12-15 10:51:18 +01:00
Petr Sloup
23c2aa54d0 Update tests 2016-08-25 11:09:01 +02:00
Petr Sloup
fb758be730 Update tests to use v0.8 dataset 2016-07-27 12:32:53 +08:00
Petr Sloup
575c1df524 Add tests for autofit static endpoints 2016-06-27 08:11:02 +02:00
Petr Sloup
d8f35bb70a Update area-based static tests 2016-06-27 08:01:28 +02:00
Petr Sloup
54073cecce Simplify URL for "static"
/styles/{id}/rendered/static/... -> /styles/{id}/static/...
2016-04-22 15:50:56 +02:00
Petr Sloup
a25ce62662 New urls for source data tiles and rendered tiles 2016-04-22 12:33:20 +02:00
Petr Sloup
074c873826 Support optional bearing and pitch in center-based static requests 2016-03-11 12:10:22 +01:00
Petr Sloup
1c73c14d84 Update and add tests 2016-03-11 11:27:17 +01:00
Petr Sloup
9efa22b52b Add more tests + better structuring 2016-03-09 17:26:34 +01:00
Petr Sloup
d6e17c1a3a More tests for the endpoints 2016-03-09 13:22:06 +01:00