locar-tiler 0.3.0 → 0.4.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.
@@ -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,6 +113,11 @@ 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 {
@@ -155,12 +160,17 @@ export declare class LonLat {
155
160
  lon: number;
156
161
  lat: number;
157
162
  /**
158
- * Creates an LonLat.
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 {
@@ -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<Tile>;
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).