@celljs/ta-geo 0.0.0-stage → 4.30.0
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.en.md +11 -0
- package/README.md +10 -2
- package/esm/geo-grid.d.ts +50 -0
- package/esm/geo-grid.js +89 -0
- package/esm/geo-mvt.d.ts +17 -0
- package/esm/geo-mvt.js +213 -0
- package/esm/geo-pixels.d.ts +27 -0
- package/esm/geo-pixels.js +138 -0
- package/esm/geo-places.d.ts +14 -0
- package/esm/geo-places.js +71 -0
- package/esm/geo-raster.d.ts +56 -0
- package/esm/geo-raster.js +258 -0
- package/esm/geo-tiles.d.ts +29 -0
- package/esm/geo-tiles.js +79 -0
- package/esm/index.d.ts +6 -0
- package/esm/index.js +7 -0
- package/esm/package.json +3 -0
- package/lib/geo-grid.d.ts +51 -0
- package/lib/geo-grid.js +92 -0
- package/lib/geo-mvt.d.ts +18 -0
- package/lib/geo-mvt.js +216 -0
- package/lib/geo-pixels.d.ts +28 -0
- package/lib/geo-pixels.js +141 -0
- package/lib/geo-places.d.ts +15 -0
- package/lib/geo-places.js +74 -0
- package/lib/geo-raster.d.ts +57 -0
- package/lib/geo-raster.js +261 -0
- package/lib/geo-tiles.d.ts +30 -0
- package/lib/geo-tiles.js +83 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +23 -0
- package/package.json +45 -4
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GeoRaster = exports.Ground = void 0;
|
|
4
|
+
const geo_grid_1 = require("./geo-grid");
|
|
5
|
+
// What is on the ground of a plot (GeoRaster), from the layers of a vector tile in the schema of OpenMapTiles: a
|
|
6
|
+
// kind of ground for each column (grass, a park, a wood, water, a road…), and the buildings, each a footprint of
|
|
7
|
+
// columns with its height in metres. Polygons fill the columns whose middle is in them (even-odd, so holes stay
|
|
8
|
+
// open); lines are as wide as what they are (a motorway, a footpath), in columns of the plot's latitude.
|
|
9
|
+
exports.Ground = {
|
|
10
|
+
LAND: 0,
|
|
11
|
+
GRASS: 1,
|
|
12
|
+
PARK: 2,
|
|
13
|
+
WOOD: 3,
|
|
14
|
+
FARM: 4,
|
|
15
|
+
SAND: 5,
|
|
16
|
+
WATER: 6,
|
|
17
|
+
PAVED: 7,
|
|
18
|
+
ROAD: 8,
|
|
19
|
+
STREET: 9,
|
|
20
|
+
PATH: 10,
|
|
21
|
+
RAIL: 11,
|
|
22
|
+
PITCH: 12,
|
|
23
|
+
};
|
|
24
|
+
/** How wide each class of transportation is, in metres, and the ground it is. */
|
|
25
|
+
const WAYS = {
|
|
26
|
+
motorway: { metres: 18, ground: exports.Ground.ROAD },
|
|
27
|
+
trunk: { metres: 16, ground: exports.Ground.ROAD },
|
|
28
|
+
primary: { metres: 14, ground: exports.Ground.ROAD },
|
|
29
|
+
secondary: { metres: 12, ground: exports.Ground.ROAD },
|
|
30
|
+
tertiary: { metres: 10, ground: exports.Ground.ROAD },
|
|
31
|
+
minor: { metres: 7, ground: exports.Ground.STREET },
|
|
32
|
+
service: { metres: 4.5, ground: exports.Ground.STREET },
|
|
33
|
+
track: { metres: 3, ground: exports.Ground.PATH },
|
|
34
|
+
path: { metres: 2.5, ground: exports.Ground.PATH },
|
|
35
|
+
rail: { metres: 4, ground: exports.Ground.RAIL },
|
|
36
|
+
transit: { metres: 4, ground: exports.Ground.RAIL },
|
|
37
|
+
pier: { metres: 4, ground: exports.Ground.PAVED },
|
|
38
|
+
};
|
|
39
|
+
const WATERWAYS = { river: 10, canal: 8, stream: 2.5, drain: 1.5, ditch: 1.5 };
|
|
40
|
+
const LANDCOVER = {
|
|
41
|
+
wood: exports.Ground.WOOD,
|
|
42
|
+
forest: exports.Ground.WOOD,
|
|
43
|
+
farmland: exports.Ground.FARM,
|
|
44
|
+
grass: exports.Ground.GRASS,
|
|
45
|
+
wetland: exports.Ground.GRASS,
|
|
46
|
+
sand: exports.Ground.SAND,
|
|
47
|
+
beach: exports.Ground.SAND,
|
|
48
|
+
};
|
|
49
|
+
const LANDUSE = {
|
|
50
|
+
commercial: exports.Ground.PAVED,
|
|
51
|
+
retail: exports.Ground.PAVED,
|
|
52
|
+
industrial: exports.Ground.PAVED,
|
|
53
|
+
railway: exports.Ground.PAVED,
|
|
54
|
+
pitch: exports.Ground.PITCH,
|
|
55
|
+
playground: exports.Ground.GRASS,
|
|
56
|
+
cemetery: exports.Ground.GRASS,
|
|
57
|
+
stadium: exports.Ground.PAVED,
|
|
58
|
+
garden: exports.Ground.PARK,
|
|
59
|
+
};
|
|
60
|
+
/** The height of a building the map does not know, in metres: two storeys. */
|
|
61
|
+
const DEFAULT_HEIGHT = 6;
|
|
62
|
+
const MAX_BUILDINGS = 65535;
|
|
63
|
+
var GeoRaster;
|
|
64
|
+
(function (GeoRaster) {
|
|
65
|
+
/**
|
|
66
|
+
* The ground of a plot from the layers of the tile it is in: `window` where in the tile, `metres` the metres
|
|
67
|
+
* a column is across there (GeoGrid.metresPerColumn).
|
|
68
|
+
*/
|
|
69
|
+
function plot(layers, window, metres) {
|
|
70
|
+
const size = geo_grid_1.PLOT_SIZE;
|
|
71
|
+
const ground = new Uint8Array(size * size);
|
|
72
|
+
const building = new Uint16Array(size * size);
|
|
73
|
+
const buildings = [];
|
|
74
|
+
if (!layers) {
|
|
75
|
+
// Nothing on the map: the open sea.
|
|
76
|
+
ground.fill(exports.Ground.WATER);
|
|
77
|
+
return { size, ground, building, buildings };
|
|
78
|
+
}
|
|
79
|
+
const toPlot = (layer) => (part) => part.map(([u, v]) => [((u / layer.extent - window.left) / window.size) * size, ((v / layer.extent - window.top) / window.size) * size]);
|
|
80
|
+
const each = (name, run) => {
|
|
81
|
+
const layer = layers.get(name);
|
|
82
|
+
if (!layer) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const map = toPlot(layer);
|
|
86
|
+
for (const feature of layer.features) {
|
|
87
|
+
run(feature, feature.geometry.map(map));
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
const set = (kind) => (i) => {
|
|
91
|
+
ground[i] = kind;
|
|
92
|
+
};
|
|
93
|
+
// What covers the land, then what is on it, the water, the ways over all of it, the buildings last.
|
|
94
|
+
each('landuse', (feature, parts) => {
|
|
95
|
+
const kind = LANDUSE[String(feature.properties.class)];
|
|
96
|
+
if (kind !== undefined && feature.type === 3) {
|
|
97
|
+
fill(parts, size, set(kind));
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
each('landcover', (feature, parts) => {
|
|
101
|
+
var _a;
|
|
102
|
+
const kind = (_a = LANDCOVER[String(feature.properties.class)]) !== null && _a !== void 0 ? _a : LANDCOVER[String(feature.properties.subclass)];
|
|
103
|
+
if (kind !== undefined && feature.type === 3) {
|
|
104
|
+
fill(parts, size, set(kind));
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
each('park', (feature, parts) => {
|
|
108
|
+
const kind = String(feature.properties.class);
|
|
109
|
+
if (feature.type === 3 && kind !== 'national_park' && kind !== 'nature_reserve' && kind !== 'protected_area') {
|
|
110
|
+
fill(parts, size, set(exports.Ground.PARK));
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
each('water', (feature, parts) => {
|
|
114
|
+
if (feature.type === 3 && feature.properties.brunnel !== 'tunnel') {
|
|
115
|
+
fill(parts, size, set(exports.Ground.WATER));
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
each('waterway', (feature, parts) => {
|
|
119
|
+
const wide = WATERWAYS[String(feature.properties.class)];
|
|
120
|
+
if (wide && feature.type === 2 && feature.properties.brunnel !== 'tunnel') {
|
|
121
|
+
for (const part of parts) {
|
|
122
|
+
stroke(part, Math.max(1, wide / metres), size, set(exports.Ground.WATER));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
each('aeroway', (feature, parts) => {
|
|
127
|
+
if (feature.type === 3) {
|
|
128
|
+
fill(parts, size, set(exports.Ground.PAVED));
|
|
129
|
+
}
|
|
130
|
+
else if (feature.type === 2) {
|
|
131
|
+
for (const part of parts) {
|
|
132
|
+
stroke(part, 40 / metres, size, set(exports.Ground.PAVED));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
// The smaller ways first, so that a main road crossing a street is the road.
|
|
137
|
+
const ways = [];
|
|
138
|
+
each('transportation', (feature, parts) => {
|
|
139
|
+
var _a;
|
|
140
|
+
if (feature.properties.brunnel === 'tunnel') {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const className = String(feature.properties.class);
|
|
144
|
+
const way = (_a = WAYS[className]) !== null && _a !== void 0 ? _a : (className.endsWith('_construction') ? undefined : WAYS.service);
|
|
145
|
+
if (!way) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
const footway = feature.properties.subclass === 'footway' || feature.properties.subclass === 'pedestrian';
|
|
149
|
+
ways.push({ width: way.metres / metres, kind: footway ? exports.Ground.PATH : way.ground, parts, area: feature.type === 3 });
|
|
150
|
+
});
|
|
151
|
+
ways.sort((a, b) => a.width - b.width);
|
|
152
|
+
for (const way of ways) {
|
|
153
|
+
if (way.area) {
|
|
154
|
+
fill(way.parts, size, set(exports.Ground.PAVED));
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
for (const part of way.parts) {
|
|
158
|
+
stroke(part, Math.max(1, way.width), size, set(way.kind));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
each('building', (feature, parts) => {
|
|
163
|
+
var _a, _b;
|
|
164
|
+
if (feature.type !== 3 || feature.properties.hide_3d === true || buildings.length >= MAX_BUILDINGS) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const height = Number((_a = feature.properties.render_height) !== null && _a !== void 0 ? _a : feature.properties.height);
|
|
168
|
+
const min = Number((_b = feature.properties.render_min_height) !== null && _b !== void 0 ? _b : feature.properties.min_height);
|
|
169
|
+
const colour = typeof feature.properties.colour === 'string' && /^#[0-9a-f]{6}$/i.test(feature.properties.colour) ? feature.properties.colour : undefined;
|
|
170
|
+
const made = {
|
|
171
|
+
height: Number.isFinite(height) && height > 0 ? height : DEFAULT_HEIGHT,
|
|
172
|
+
min: Number.isFinite(min) && min > 0 ? min : 0,
|
|
173
|
+
area: 0,
|
|
174
|
+
x: 0,
|
|
175
|
+
z: 0,
|
|
176
|
+
...(colour ? { colour } : {}),
|
|
177
|
+
};
|
|
178
|
+
const id = buildings.length + 1;
|
|
179
|
+
let sx = 0;
|
|
180
|
+
let sz = 0;
|
|
181
|
+
fill(parts, size, i => {
|
|
182
|
+
building[i] = id;
|
|
183
|
+
made.area++;
|
|
184
|
+
sx += i % size;
|
|
185
|
+
sz += Math.floor(i / size);
|
|
186
|
+
});
|
|
187
|
+
if (made.area > 0) {
|
|
188
|
+
made.x = sx / made.area + 0.5;
|
|
189
|
+
made.z = sz / made.area + 0.5;
|
|
190
|
+
buildings.push(made);
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
return { size, ground, building, buildings };
|
|
194
|
+
}
|
|
195
|
+
GeoRaster.plot = plot;
|
|
196
|
+
/** Runs `set` on each column whose middle is inside the rings (even-odd). */
|
|
197
|
+
function fill(rings, size, set) {
|
|
198
|
+
let top = Number.POSITIVE_INFINITY;
|
|
199
|
+
let bottom = Number.NEGATIVE_INFINITY;
|
|
200
|
+
for (const ring of rings) {
|
|
201
|
+
for (const [, z] of ring) {
|
|
202
|
+
top = Math.min(top, z);
|
|
203
|
+
bottom = Math.max(bottom, z);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
const from = Math.max(0, Math.floor(top));
|
|
207
|
+
const to = Math.min(size - 1, Math.ceil(bottom));
|
|
208
|
+
const xs = [];
|
|
209
|
+
for (let row = from; row <= to; row++) {
|
|
210
|
+
const z = row + 0.5;
|
|
211
|
+
xs.length = 0;
|
|
212
|
+
for (const ring of rings) {
|
|
213
|
+
for (let k = 0; k + 1 < ring.length; k++) {
|
|
214
|
+
const [x1, z1] = ring[k];
|
|
215
|
+
const [x2, z2] = ring[k + 1];
|
|
216
|
+
if (z1 <= z !== z2 <= z) {
|
|
217
|
+
xs.push(x1 + ((z - z1) / (z2 - z1)) * (x2 - x1));
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
xs.sort((a, b) => a - b);
|
|
222
|
+
for (let k = 0; k + 1 < xs.length; k += 2) {
|
|
223
|
+
const start = Math.max(0, Math.ceil(xs[k] - 0.5));
|
|
224
|
+
const end = Math.min(size - 1, Math.floor(xs[k + 1] - 0.5));
|
|
225
|
+
for (let x = start; x <= end; x++) {
|
|
226
|
+
set(row * size + x);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
GeoRaster.fill = fill;
|
|
232
|
+
/** Runs `set` on each column whose middle is within `width / 2` of the line. */
|
|
233
|
+
function stroke(line, width, size, set) {
|
|
234
|
+
const half = width / 2;
|
|
235
|
+
for (let k = 0; k + 1 < line.length; k++) {
|
|
236
|
+
const [x1, z1] = line[k];
|
|
237
|
+
const [x2, z2] = line[k + 1];
|
|
238
|
+
const left = Math.max(0, Math.floor(Math.min(x1, x2) - half));
|
|
239
|
+
const right = Math.min(size - 1, Math.ceil(Math.max(x1, x2) + half));
|
|
240
|
+
const top = Math.max(0, Math.floor(Math.min(z1, z2) - half));
|
|
241
|
+
const bottom = Math.min(size - 1, Math.ceil(Math.max(z1, z2) + half));
|
|
242
|
+
const dx = x2 - x1;
|
|
243
|
+
const dz = z2 - z1;
|
|
244
|
+
const length = dx * dx + dz * dz;
|
|
245
|
+
for (let z = top; z <= bottom; z++) {
|
|
246
|
+
for (let x = left; x <= right; x++) {
|
|
247
|
+
const px = x + 0.5;
|
|
248
|
+
const pz = z + 0.5;
|
|
249
|
+
const t = length > 0 ? Math.max(0, Math.min(1, ((px - x1) * dx + (pz - z1) * dz) / length)) : 0;
|
|
250
|
+
const ex = px - (x1 + t * dx);
|
|
251
|
+
const ez = pz - (z1 + t * dz);
|
|
252
|
+
if (ex * ex + ez * ez <= half * half) {
|
|
253
|
+
set(z * size + x);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
GeoRaster.stroke = stroke;
|
|
260
|
+
})(GeoRaster || (exports.GeoRaster = GeoRaster = {}));
|
|
261
|
+
//# sourceMappingURL=geo-raster.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { MapTile } from './geo-grid';
|
|
2
|
+
import { type MvtLayer } from './geo-mvt';
|
|
3
|
+
export type Fetcher = (url: string, init?: RequestInit) => Promise<Response>;
|
|
4
|
+
export interface GeoTileSource {
|
|
5
|
+
/** The version read now: the latest of the source. */
|
|
6
|
+
latest(): Promise<string>;
|
|
7
|
+
/** The layers of a tile of a version; none where the map has nothing (the open sea). */
|
|
8
|
+
tile(tile: MapTile, version: string): Promise<Map<string, MvtLayer> | undefined>;
|
|
9
|
+
/** The highest zoom it has tiles of. */
|
|
10
|
+
readonly maxZoom: number;
|
|
11
|
+
}
|
|
12
|
+
export declare class OpenFreeMapTiles implements GeoTileSource {
|
|
13
|
+
protected readonly fetcher: Fetcher;
|
|
14
|
+
protected readonly base: string;
|
|
15
|
+
readonly maxZoom = 14;
|
|
16
|
+
protected version?: Promise<{
|
|
17
|
+
version: string;
|
|
18
|
+
template: string;
|
|
19
|
+
}>;
|
|
20
|
+
protected readonly kept: Map<string, Promise<Map<string, MvtLayer> | undefined>>;
|
|
21
|
+
constructor(fetcher?: Fetcher, base?: string);
|
|
22
|
+
latest(): Promise<string>;
|
|
23
|
+
tile(tile: MapTile, version: string): Promise<Map<string, MvtLayer> | undefined>;
|
|
24
|
+
protected load(tile: MapTile, version: string): Promise<Map<string, MvtLayer> | undefined>;
|
|
25
|
+
protected read(): Promise<{
|
|
26
|
+
version: string;
|
|
27
|
+
template: string;
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=geo-tiles.d.ts.map
|
package/lib/geo-tiles.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpenFreeMapTiles = void 0;
|
|
4
|
+
const geo_mvt_1 = require("./geo-mvt");
|
|
5
|
+
const GZIP = [0x1f, 0x8b];
|
|
6
|
+
/** Tiles kept decoded, the latest read. */
|
|
7
|
+
const KEPT = 8;
|
|
8
|
+
async function gunzip(bytes) {
|
|
9
|
+
if (bytes[0] !== GZIP[0] || bytes[1] !== GZIP[1]) {
|
|
10
|
+
return bytes;
|
|
11
|
+
}
|
|
12
|
+
const stream = new Blob([bytes]).stream().pipeThrough(new DecompressionStream('gzip'));
|
|
13
|
+
return new Uint8Array(await new Response(stream).arrayBuffer());
|
|
14
|
+
}
|
|
15
|
+
class OpenFreeMapTiles {
|
|
16
|
+
constructor(fetcher = (url, init) => fetch(url, init), base = 'https://tiles.openfreemap.org/planet') {
|
|
17
|
+
this.fetcher = fetcher;
|
|
18
|
+
this.base = base;
|
|
19
|
+
this.maxZoom = 14;
|
|
20
|
+
this.kept = new Map();
|
|
21
|
+
}
|
|
22
|
+
latest() {
|
|
23
|
+
return this.read().then(each => each.version);
|
|
24
|
+
}
|
|
25
|
+
tile(tile, version) {
|
|
26
|
+
const key = `${version}/${tile.z}/${tile.x}/${tile.y}`;
|
|
27
|
+
const kept = this.kept.get(key);
|
|
28
|
+
if (kept) {
|
|
29
|
+
this.kept.delete(key);
|
|
30
|
+
this.kept.set(key, kept);
|
|
31
|
+
return kept;
|
|
32
|
+
}
|
|
33
|
+
const made = this.load(tile, version);
|
|
34
|
+
made.catch(() => this.kept.delete(key));
|
|
35
|
+
this.kept.set(key, made);
|
|
36
|
+
while (this.kept.size > KEPT) {
|
|
37
|
+
this.kept.delete(this.kept.keys().next().value);
|
|
38
|
+
}
|
|
39
|
+
return made;
|
|
40
|
+
}
|
|
41
|
+
async load(tile, version) {
|
|
42
|
+
const { template, version: latest } = await this.read();
|
|
43
|
+
const url = (of) => template.replace(latest, of).replace('{z}', String(tile.z)).replace('{x}', String(tile.x)).replace('{y}', String(tile.y));
|
|
44
|
+
let response = await this.fetcher(url(version));
|
|
45
|
+
// A version the source no longer keeps: the latest, which differs a little at most.
|
|
46
|
+
if (response.status === 404 && version !== latest) {
|
|
47
|
+
response = await this.fetcher(url(latest));
|
|
48
|
+
}
|
|
49
|
+
if (response.status === 204 || response.status === 404) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
if (!response.ok) {
|
|
53
|
+
throw new Error(`Map tile ${tile.z}/${tile.x}/${tile.y}: HTTP ${response.status}`);
|
|
54
|
+
}
|
|
55
|
+
const bytes = await gunzip(new Uint8Array(await response.arrayBuffer()));
|
|
56
|
+
return bytes.length > 0 ? geo_mvt_1.GeoMvt.decode(bytes) : undefined;
|
|
57
|
+
}
|
|
58
|
+
read() {
|
|
59
|
+
var _a;
|
|
60
|
+
(_a = this.version) !== null && _a !== void 0 ? _a : (this.version = this.fetcher(this.base)
|
|
61
|
+
.then(response => {
|
|
62
|
+
if (!response.ok) {
|
|
63
|
+
throw new Error(`Map source: HTTP ${response.status}`);
|
|
64
|
+
}
|
|
65
|
+
return response.json();
|
|
66
|
+
})
|
|
67
|
+
.then(json => {
|
|
68
|
+
var _a, _b;
|
|
69
|
+
const template = (_a = json.tiles) === null || _a === void 0 ? void 0 : _a[0];
|
|
70
|
+
const version = template && ((_b = /\/([^/]+)\/\{z\}/.exec(template)) === null || _b === void 0 ? void 0 : _b[1]);
|
|
71
|
+
if (!template || !version) {
|
|
72
|
+
throw new Error('Map source: no tiles');
|
|
73
|
+
}
|
|
74
|
+
return { template, version };
|
|
75
|
+
}));
|
|
76
|
+
this.version.catch(() => {
|
|
77
|
+
this.version = undefined;
|
|
78
|
+
});
|
|
79
|
+
return this.version;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.OpenFreeMapTiles = OpenFreeMapTiles;
|
|
83
|
+
//# sourceMappingURL=geo-tiles.js.map
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./geo-grid"), exports);
|
|
18
|
+
__exportStar(require("./geo-mvt"), exports);
|
|
19
|
+
__exportStar(require("./geo-pixels"), exports);
|
|
20
|
+
__exportStar(require("./geo-places"), exports);
|
|
21
|
+
__exportStar(require("./geo-raster"), exports);
|
|
22
|
+
__exportStar(require("./geo-tiles"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-geo",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "4.30.0",
|
|
4
|
+
"description": "Real places for Ta's extensions: a grid of plots over the earth, vector tiles of OpenStreetMap decoded, places searched, the device's location, and what is on the ground of a plot as a grid",
|
|
5
|
+
"homepage": "https://github.com/cellbang/ta",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/cellbang/ta/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/cellbang/cell.git"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"main": "lib/index.js",
|
|
15
|
+
"typings": "lib/index.d.ts",
|
|
16
|
+
"files": [
|
|
17
|
+
"lib",
|
|
18
|
+
"esm",
|
|
19
|
+
"!lib/**/*.spec.*",
|
|
20
|
+
"!**/*.map"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc -b && bun ../../scripts/build-esm.ts",
|
|
24
|
+
"clean": "rm -rf lib esm *.tsbuildinfo",
|
|
25
|
+
"test": "bun test ./lib",
|
|
26
|
+
"watch": "tsc -b -w --preserveWatchOutput"
|
|
27
|
+
},
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"import": "./esm/index.js",
|
|
34
|
+
"default": "./lib/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./package.json": "./package.json",
|
|
37
|
+
"./lib/*.js": {
|
|
38
|
+
"import": "./esm/*.js",
|
|
39
|
+
"default": "./lib/*.js"
|
|
40
|
+
},
|
|
41
|
+
"./lib/*": {
|
|
42
|
+
"import": "./esm/*.js",
|
|
43
|
+
"default": "./lib/*.js"
|
|
44
|
+
},
|
|
45
|
+
"./*": "./*"
|
|
46
|
+
}
|
|
47
|
+
}
|