locar-tiler 0.3.0 → 0.5.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/dist/locar-tiler.d.ts +19 -8
- package/dist/locar-tiler.mjs +440 -423
- package/dist/locar-tiler.umd.js +1 -1
- package/package.json +1 -1
package/dist/locar-tiler.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export declare class DemTiler extends Tiler {
|
|
|
69
69
|
/**
|
|
70
70
|
* Create a DemTiler.
|
|
71
71
|
* @class
|
|
72
|
-
* @param {string} URL of the server delivering the tiles.
|
|
72
|
+
* @param {string} url - URL of the server delivering the tiles.
|
|
73
73
|
*/
|
|
74
74
|
constructor(url: string);
|
|
75
75
|
/**
|
|
@@ -83,7 +83,7 @@ export declare class DemTiler extends Tiler {
|
|
|
83
83
|
* @param {EastNorth} sphMercPos - the Spherical Mercator position.
|
|
84
84
|
* @return {number} the elevation in metres, or Number.NEGATIVE_INFINITY if this position is outside the extent of the DEM.
|
|
85
85
|
*/
|
|
86
|
-
getElevation(sphMercPos: EastNorth): number;
|
|
86
|
+
getElevation(sphMercPos: EastNorth): number | null;
|
|
87
87
|
/**
|
|
88
88
|
* Obtain the elevation in metres for a given longitude/latitude.
|
|
89
89
|
* @param {LonLat} lonLat - the longitude/latitude.
|
|
@@ -113,11 +113,16 @@ export declare class EastNorth {
|
|
|
113
113
|
* @param {number} n - the northing.
|
|
114
114
|
*/
|
|
115
115
|
constructor(e: any, n: any);
|
|
116
|
+
/**
|
|
117
|
+
* Returns a string representation of the EastNorth.
|
|
118
|
+
* @return {string} the string representation.
|
|
119
|
+
*/
|
|
120
|
+
toString(): string;
|
|
116
121
|
}
|
|
117
122
|
|
|
118
123
|
export declare interface Feature {
|
|
119
124
|
type: string;
|
|
120
|
-
properties: any
|
|
125
|
+
properties: Map<string, any>;
|
|
121
126
|
geometry: Point | LineString | MultiLineString;
|
|
122
127
|
}
|
|
123
128
|
|
|
@@ -144,7 +149,7 @@ export declare class JsonTiler extends Tiler {
|
|
|
144
149
|
|
|
145
150
|
export declare interface LineString {
|
|
146
151
|
type: string;
|
|
147
|
-
coordinates: number
|
|
152
|
+
coordinates: Array<[number, number, number?]>;
|
|
148
153
|
}
|
|
149
154
|
|
|
150
155
|
/** Represents a longitude/latitude.
|
|
@@ -155,22 +160,27 @@ export declare class LonLat {
|
|
|
155
160
|
lon: number;
|
|
156
161
|
lat: number;
|
|
157
162
|
/**
|
|
158
|
-
* Creates
|
|
163
|
+
* Creates a LonLat.
|
|
159
164
|
* @class
|
|
160
165
|
* @param {number} lon - the longitude.
|
|
161
166
|
* @param {number} lat - the latitude.
|
|
162
167
|
*/
|
|
163
168
|
constructor(lon: any, lat: any);
|
|
169
|
+
/**
|
|
170
|
+
* Returns a string representation of the LonLat.
|
|
171
|
+
* @return {string} the string representation.
|
|
172
|
+
*/
|
|
173
|
+
toString(): string;
|
|
164
174
|
}
|
|
165
175
|
|
|
166
176
|
export declare interface MultiLineString {
|
|
167
177
|
type: string;
|
|
168
|
-
coordinates: number
|
|
178
|
+
coordinates: Array<Array<[number, number, number?]>>;
|
|
169
179
|
}
|
|
170
180
|
|
|
171
181
|
export declare interface Point {
|
|
172
182
|
type: string;
|
|
173
|
-
coordinates: number
|
|
183
|
+
coordinates: [number, number, number?];
|
|
174
184
|
}
|
|
175
185
|
|
|
176
186
|
export declare interface RawPngData {
|
|
@@ -249,6 +259,7 @@ export declare class Tile {
|
|
|
249
259
|
* @return {string} a string indexing the tile in format z/x/y
|
|
250
260
|
*/
|
|
251
261
|
getIndex(): string;
|
|
262
|
+
toString(): string;
|
|
252
263
|
}
|
|
253
264
|
|
|
254
265
|
/** Represents a tiler, capable of delivering Tiles from a given URL. */
|
|
@@ -310,7 +321,7 @@ export declare abstract class Tiler {
|
|
|
310
321
|
* @param {number} z - zoom level to use (default 13)
|
|
311
322
|
* @return {Promise<Tile>} Promise resolving with the given Tile.
|
|
312
323
|
*/
|
|
313
|
-
getData(sphMercPos: EastNorth, z?: number): Promise<
|
|
324
|
+
getData(sphMercPos: EastNorth, z?: number): Promise<DataTile>;
|
|
314
325
|
/**
|
|
315
326
|
* Converts the raw data from the server to a custom type of data.
|
|
316
327
|
* By default, returns a DataTile object containing the Tile and the raw data returned from readTile(), but this can be overridden (e.g. in DemTile the `data` of the DataTile is a DEM object).
|