chiitiler 1.14.0 → 1.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -10
- package/dist/render/rasterize.d.ts +1 -1
- package/dist/source/fs.d.ts +1 -1
- package/dist/source/s3.d.ts +1 -1
- package/package.json +51 -52
package/README.md
CHANGED
|
@@ -14,11 +14,17 @@ chii-tiler: "tiny" in Japanese is "chiisai", shorten into "chii"
|
|
|
14
14
|
- In this type of server, there is a de-facto - [maptiler/tileserver-gl](https://github.com/maptiler/tileserver-gl), but this is too big for me.
|
|
15
15
|
- I want a server accept style.json-url and respond raster tile, inspired by [developmentseed/titiler](https://github.com/developmentseed/titiler)
|
|
16
16
|
|
|
17
|
+
## usecases
|
|
18
|
+
|
|
19
|
+
- [MIERUNE/tiles](https://github.com/MIERUNE/tiles) - You can find example [here](https://mierune.github.io/tiles/color.html#11.62/43.064/141.3375)
|
|
20
|
+
- [dayjournal/qgis-amazonlocationservice-plugin](https://github.com/dayjournal/qgis-amazonlocationservice-plugin) - used in Maps feature
|
|
21
|
+
- [Allmaps Latest - Bluesky](https://bsky.app/profile/latest.allmaps.org)
|
|
22
|
+
|
|
17
23
|
## features
|
|
18
24
|
|
|
19
25
|
### /tiles
|
|
20
26
|
|
|
21
|
-
chiitiler provides you with `/tiles
|
|
27
|
+
chiitiler provides you with an endpoint `/tiles`. Once server launched, you can use the endpoint like this:
|
|
22
28
|
|
|
23
29
|
```planetext
|
|
24
30
|
http://localhost:3000/tiles/0/0/0.png?url=https://tile.openstreetmap.jp/styles/osm-bright/style.json
|
|
@@ -105,7 +111,7 @@ you can pass server options via environment variables
|
|
|
105
111
|
| CHIITILER_S3_ENDPOINT | | s3 endpoint for caching/fetching |
|
|
106
112
|
| CHIITILER_S3_FORCE_PATH_STYLE | false | force path style for s3, needed for minio |
|
|
107
113
|
|
|
108
|
-
###
|
|
114
|
+
### CLI (deprecated)
|
|
109
115
|
|
|
110
116
|
- Node.js v18 or v20
|
|
111
117
|
|
|
@@ -140,21 +146,23 @@ node dist/main.js tile-server -c s3 -s3b chiitiler -s3r ap-northeast-1
|
|
|
140
146
|
# caution: TTL is not supported in S3 cache, please utilize S3 lifecycle policy
|
|
141
147
|
```
|
|
142
148
|
|
|
143
|
-
|
|
149
|
+
### debug page
|
|
144
150
|
|
|
145
|
-
- in debug mode, you can access
|
|
146
|
-
-
|
|
147
|
-
|
|
151
|
+
- in debug mode, you can access:
|
|
152
|
+
- debug page: <http://localhost:3000/debug>
|
|
153
|
+
- You can pass style.json url: <http://localhost:3000/debug?url=https://tile.openstreetmap.jp/styles/osm-bright/style.json>
|
|
154
|
+
- editor page: <http://localhost:3000/editor>
|
|
148
155
|
|
|
149
156
|
## supported protocols in style.json
|
|
150
157
|
|
|
151
158
|
- `http://` or `https://` protocol are used in Style Specification
|
|
152
159
|
- In addition, chiitiler supports following protocols:
|
|
153
160
|
- `s3://` for S3 bucket
|
|
154
|
-
- `file://` for
|
|
155
|
-
- `mbtiles://` for
|
|
156
|
-
- `pmtiles://`
|
|
157
|
-
-
|
|
161
|
+
- `file://` for file system
|
|
162
|
+
- `mbtiles://` for MBTIles files
|
|
163
|
+
- `pmtiles://` for PMTiles, remote or local or s3
|
|
164
|
+
- `cog://` experimental, for Cloud Optimized GeoTIFF. CRS must be EPSG:3857.
|
|
165
|
+
- Only when `http://` and `https://` chiitiler cache them with a method you specified.
|
|
158
166
|
|
|
159
167
|
### example
|
|
160
168
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RenderOptions } from '@maplibre/maplibre-gl-native';
|
|
2
2
|
import type { StyleSpecification } from '@maplibre/maplibre-gl-style-spec';
|
|
3
3
|
import type { Cache } from '../cache/index.js';
|
|
4
|
-
declare function render(style: StyleSpecification, renderOptions: RenderOptions, cache: Cache, mode: 'tile' | 'static'): Promise<Uint8Array
|
|
4
|
+
declare function render(style: StyleSpecification, renderOptions: RenderOptions, cache: Cache, mode: 'tile' | 'static'): Promise<Uint8Array<ArrayBufferLike>>;
|
|
5
5
|
declare function renderTile(style: StyleSpecification, z: number, x: number, y: number, options: {
|
|
6
6
|
tileSize: number;
|
|
7
7
|
cache: Cache;
|
package/dist/source/fs.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function getFilesystemSource(uri: string): Promise<Buffer | null>;
|
|
1
|
+
declare function getFilesystemSource(uri: string): Promise<Buffer<ArrayBufferLike> | null>;
|
|
2
2
|
export { getFilesystemSource };
|
package/dist/source/s3.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function getS3Source(uri: string): Promise<Buffer | null>;
|
|
1
|
+
declare function getS3Source(uri: string): Promise<Buffer<Uint8Array<ArrayBufferLike>> | null>;
|
|
2
2
|
export { getS3Source };
|
package/package.json
CHANGED
|
@@ -1,53 +1,52 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
2
|
+
"type": "module",
|
|
3
|
+
"name": "chiitiler",
|
|
4
|
+
"version": "1.14.1",
|
|
5
|
+
"description": "Tiny map rendering server for MapLibre Style Spec",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "npx esbuild --bundle src/main.ts --minify --outfile=build/main.cjs --platform=node --external:@maplibre/maplibre-gl-native --external:sharp",
|
|
13
|
+
"dev": "tsx watch src/main.ts tile-server -D",
|
|
14
|
+
"test:unit": "vitest src",
|
|
15
|
+
"test:coverage": "vitest src --coverage --coverage.provider=v8",
|
|
16
|
+
"test:integration": "vitest tests/integration.test.ts",
|
|
17
|
+
"test:benchmark": "vitest bench"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [],
|
|
20
|
+
"author": "Kanahiro Iguchi",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@tsconfig/node20": "^20.1.4",
|
|
24
|
+
"@types/better-sqlite3": "^7.6.10",
|
|
25
|
+
"@types/node": "^20.6.0",
|
|
26
|
+
"@vitest/coverage-v8": "^1.6.0",
|
|
27
|
+
"esbuild": "^0.25.0",
|
|
28
|
+
"image-size": "^1.1.1",
|
|
29
|
+
"maplibre-gl": "^3.3.1",
|
|
30
|
+
"ts-node": "^10.9.1",
|
|
31
|
+
"tsx": "^4.7.1",
|
|
32
|
+
"typescript": "^5.2.2",
|
|
33
|
+
"vitest": "^1.6.0",
|
|
34
|
+
"@aws-sdk/client-s3": "^3.418.0",
|
|
35
|
+
"@hono/node-server": "^1.12.0",
|
|
36
|
+
"@mapbox/sphericalmercator": "^1.2.0",
|
|
37
|
+
"@mapbox/tilebelt": "^1.0.2",
|
|
38
|
+
"@maplibre/maplibre-gl-style-spec": "^20.2.0",
|
|
39
|
+
"better-sqlite3": "^9.6.0",
|
|
40
|
+
"commander": "^11.0.0",
|
|
41
|
+
"file-system-cache": "^2.4.4",
|
|
42
|
+
"higuruma": "^0.1.6",
|
|
43
|
+
"hono": "^4.5.4",
|
|
44
|
+
"lightning-pool": "^4.2.2",
|
|
45
|
+
"lru-cache": "^11.0.0",
|
|
46
|
+
"pmtiles": "^3.0.5"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@maplibre/maplibre-gl-native": "^5.4.0",
|
|
50
|
+
"sharp": "^0.32.5"
|
|
51
|
+
}
|
|
52
|
+
}
|