Commit graph

99 commits

Author SHA1 Message Date
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
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
Andrew Calcutt
212af8145c
fix canvas import (#631) 2022-10-28 19:04:20 -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
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
Michael Nutt
7cfcc413c4
don't include duplicate attributions (#613) 2022-09-24 16:36:39 -04:00
Nathan Gass
edd36dd251
Open mbtiles in readonly mode (#506) 2022-09-24 12:17:35 -04:00
Frank
161ac5ff84
Fix rendering with tileMargin on top and bottom border of map (#571)
Co-authored-by: Frank Stolle <f.stolle@hosting-agency.de>
2022-09-22 23:22:06 -04:00
acalcutt
8584a117fe change to single quotes 2022-09-21 10:31:57 -04:00
acalcutt
c1e9dc76ea more static respondImage 2022-09-20 23:33:51 -04:00
acalcutt
80d3699383 try to make a separate static renderer pool 2022-09-20 23:12:01 -04:00
acalcutt
72fdf84292 Change to use maplibre-native and maplibre-gl-style-spec 2022-09-14 17:33:02 -04:00
bheupers
4036d528ec
Render up to scale level 22
For detailed city rendering we need to render rasterfiles up to and including level 21. Therefore I propose to change the maximum raster level to 22
2020-11-04 14:42:46 +01:00
Petr Sloup
5585f49396
Update serve_rendered.js
Fix accidentally removed #414
2020-04-07 10:29:19 +02:00
Petr Sloup
29d3e72dd3 Replace last references to the old repository/dockerhub 2020-03-11 13:57:45 +01:00
Petr Sloup
cf0eedb379 Merge branch 'dynamic_styles' 2020-02-10 14:00:58 +01:00
Petr Sloup
95bb59dcfe
Merge pull request #414 from xabbu42/issue-171
Close connection on errors
2020-01-28 15:46:52 +01:00
Nathan Gass
9fd381640e Close connection on erros 2020-01-28 14:30:36 +01:00
Nathan Gass
b7c384f1ee FIx issue #350 Semi-transparent outlines on raw, premultiplied input 2020-01-28 14:25:00 +01:00
Petr Sloup
d7a34f3a74 Add "serveAllStyles" option + watch the directory 2020-01-07 15:59:38 +01:00
Petr Sloup
cb700181d3 Refactor style/rendered/data serving to allow for dynamic adding/removing of items 2020-01-07 14:32:30 +01:00
Petr Sloup
226b979592 Fix deprecation warnings 2019-12-30 17:18:05 +01:00
Petr Sloup
96161fc656
Merge branch 'master' into refactor 2019-12-30 11:49:37 +01:00
Petr Sloup
bdd0a5c868
Merge pull request #394 from korpd/master
Don't multiply tileMargin with scale since the renderer is already taking care of scaling
2019-12-30 09:21:04 +01:00
Petr Sloup
5048388d1f Try to reduce number of broken labels on tile edges (#344, #347) 2019-12-30 09:11:53 +01:00
Yuri Astrakhan
7f8be27844 Update code to ES6
* var  ->  let / const
* [].forEach  ->  for (... of ...)
* '...' + var  ->  template strings  `...${var}`
* function  ->  arrow functions `=>`
* use === and !==  instead of == and !=
2019-12-21 14:09:20 -05:00
Yuri Astrakhan
736e8d393a Upgrade to node10, latest dependencies
use node10 (latest node that has binary built @mapbox/mapbox-gl-native v5.0.2)
use latest canvas and sharp API
2019-12-21 12:09:07 -05:00
Daniel Korp
1c24d12b0d
Minor fix: Don't multiply tileMargin with scale since the renderer is already taking care of scaling 2019-11-13 15:10:13 +01:00
Petr Sloup
f77ccd06af
Merge pull request #379 from stefslon/tile_margin
Add tileMargin option
2019-10-02 12:26:49 +02:00
Petr Sloup
aa7ae575d0 Flatten 3D buildings when rendering to remove artifacts 2019-08-26 12:10:49 +02:00
stefslon
17a73b1d4a Add tileMargin option 2019-08-08 21:57:51 -04:00
Eric Xanderson
ba62f0bf30
verbose output empty tile warning
Empty tile warning details; definitely what you would expect if there's not a catastrophic error, but you're getting blank tiles.

such as: ```
MBTiles error, serving empty { Error: SQLITE_CORRUPT: database disk image is malformed
lily_tile_server |     at Error (native) errno: 11, code: 'SQLITE_CORRUPT' }

```
https://github.com/klokantech/tileserver-gl/issues/323
2019-04-23 20:51:39 -05:00
Alban Mouton
c99a1a5425 Merge remote-tracking branch 'klokantech/master' into public_url
# Conflicts:
#	src/main.js
#	src/server.js
2018-12-19 09:53:40 +01:00
Rani Pinchuk
81f65af3a8 Fix log message when incorrect header exception is caught 2017-11-09 18:00:41 +01:00
Rani Pinchuk
a0eb5800fd Catch incorrect header exceptions 2017-11-03 16:53:45 +01:00
Tim Schaub
3d48485475 Reject on font loading error 2017-10-23 10:01:16 -06:00
Tim Schaub
c060dedf20 Avoid swallowing rejected font loading promise 2017-10-23 10:01:01 -06:00
Alban Mouton
dc6be5047c missing public_url in tiles urls 2017-10-18 14:49:10 +02:00
Petr Sloup
82f179b07c Minor fix for correctly serving empty responses for missing tiles 2017-10-02 13:56:32 +02:00
Osmo Salomaa
89878015bb Make raster tile renderer pool sizes configurable 2017-10-01 18:40:16 +03:00
Petr Sloup
d9f8582279 Remove node-pngquant-native dependency
- Unnecessary native dependency
- It was disabled by default
- Has issues on certain platforms
- Not optimal for production use (performance)
2017-09-15 17:06:42 +02:00
Tim Schaub
7bdb7afcb9 Reuse the function for creating empty responses 2017-08-23 11:30:05 -04:00
Tim Schaub
2e46700cd9 Try to create the appropriate data type on http errors 2017-08-22 14:17:53 -04:00
Petr Sloup
42f24c2c99 Add concept of data decorator function 2017-07-28 09:53:32 +02:00
Petr Sloup
698c527e94 Change endpoint URLs (close #154)
- styles at /style/{id}/style.json
- rendered tiles at /style/{id}/{z}/{x}/{y}.{format}
- TileJSONs at /style/{id}.json
2017-06-22 16:37:32 +02:00
Petr Sloup
8fd7a9b42b Update dependencies to get ready for node v6 2017-06-22 16:37:32 +02:00
Tim Schaub
de83021c3d Log errors to stderr and return 2017-06-20 08:09:59 -07:00
Petr Sloup
bdc3d20524 Use promises instead of async in font concatenation (remove async dependency) 2017-05-10 10:22:39 +02:00