chiitiler 1.23.3 → 1.23.5
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 -0
- package/dist/index.d.ts +3 -0
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -108,6 +108,24 @@ const png = await getRenderedTileBuffer({
|
|
|
108
108
|
|
|
109
109
|
Available renderers: `getRenderedTileBuffer`, `getRenderedClipBuffer`, `getRenderedCameraBuffer`, and their `*Stream` variants (`Sharp` instances for further piping).
|
|
110
110
|
|
|
111
|
+
Types are re-exported as well, so you can annotate call sites without depending on
|
|
112
|
+
`@maplibre/maplibre-gl-style-spec` resolution in your own tree:
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
import type {
|
|
116
|
+
StyleSpecification,
|
|
117
|
+
GetRenderedTileOptions,
|
|
118
|
+
GetRenderedClipOptions,
|
|
119
|
+
GetRenderedCameraOptions,
|
|
120
|
+
SupportedFormat,
|
|
121
|
+
Cache,
|
|
122
|
+
} from 'chiitiler';
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Prefer chiitiler's `StyleSpecification` over importing it from
|
|
126
|
+
`@maplibre/maplibre-gl-style-spec` directly: if your tree resolves a different major of
|
|
127
|
+
that package, the two structurally-different types are not assignable to each other.
|
|
128
|
+
|
|
111
129
|
chiitiler doesn't override the `User-Agent` on outbound HTTP requests by default, so the runtime's default is used (Node sends `node`). Some tile providers (e.g. OpenStreetMap) require an identifying User-Agent — set one with `setUserAgent('my-app/1.0')` or the `CHIITILER_USER_AGENT` environment variable.
|
|
112
130
|
|
|
113
131
|
## Configuration
|
package/dist/index.d.ts
CHANGED
|
@@ -7,3 +7,6 @@ export declare function getRenderedTileBuffer(options: GetRenderedTileOptions):
|
|
|
7
7
|
export { getRenderedTile as getRenderedTileStream };
|
|
8
8
|
export * as ChiitilerCache from './cache/index.js';
|
|
9
9
|
export { setUserAgent } from './source/userAgent.js';
|
|
10
|
+
export type { GetRenderedClipOptions, GetRenderedTileOptions, GetRenderedCameraOptions, SupportedFormat, } from './render/index.js';
|
|
11
|
+
export type { Cache } from './cache/index.js';
|
|
12
|
+
export type { StyleSpecification } from '@maplibre/maplibre-gl-style-spec';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "chiitiler",
|
|
4
|
-
"version": "1.23.
|
|
4
|
+
"version": "1.23.5",
|
|
5
5
|
"description": "Tiny map rendering server for MapLibre Style Spec",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -41,14 +41,13 @@
|
|
|
41
41
|
"@hono/node-server": "^2.0.0",
|
|
42
42
|
"@mapbox/tilebelt": "^2.0.3",
|
|
43
43
|
"@maplibre/maplibre-gl-native": "^6.4.1",
|
|
44
|
-
"@maplibre/maplibre-gl-style-spec": "^
|
|
44
|
+
"@maplibre/maplibre-gl-style-spec": "^26.4.2",
|
|
45
45
|
"commander": "^14.0.3",
|
|
46
46
|
"file-system-cache": "^2.4.7",
|
|
47
47
|
"higuruma": "^0.1.6",
|
|
48
48
|
"hono": "^4.12.14",
|
|
49
49
|
"lightning-pool": "^4.12.0",
|
|
50
50
|
"lru-cache": "^11.3.5",
|
|
51
|
-
"maplibre-gl": "^5.23.0",
|
|
52
51
|
"pmtiles": "^4.4.1",
|
|
53
52
|
"sharp": "^0.35.3"
|
|
54
53
|
}
|