Skip to content

Commit

Permalink
[BUILD 1.3.9]
Browse files Browse the repository at this point in the history
  • Loading branch information
GastonZalba committed Aug 11, 2023
1 parent 6e46378 commit d358988
Show file tree
Hide file tree
Showing 7 changed files with 175 additions and 75 deletions.
52 changes: 47 additions & 5 deletions lib/ol-elevation-parser.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,20 @@ export default class ElevationParser extends Control {
protected _countConnections: number;
protected _readFromImage: ReadFromImage;
protected _initialized: boolean;
on: OnSignature<EventTypes, BaseEvent, EventsKey> & OnSignature<ObjectEventTypes | ElevationParserEventTypes, ObjectEvent, EventsKey> & CombinedOnSignature<ElevationParserEventTypes | ObjectEventTypes | EventTypes, EventsKey>;
once: OnSignature<EventTypes, BaseEvent, EventsKey> & OnSignature<ObjectEventTypes | ElevationParserEventTypes, ObjectEvent, EventsKey> & CombinedOnSignature<ElevationParserEventTypes | ObjectEventTypes | EventTypes, EventsKey>;
un: OnSignature<EventTypes, BaseEvent, void> & OnSignature<ObjectEventTypes | ElevationParserEventTypes, ObjectEvent, void> & CombinedOnSignature<ElevationParserEventTypes | ObjectEventTypes | EventTypes, void>;
on: OnSignature<EventTypes | `${GeneralEventTypes}`, BaseEvent, EventsKey> & OnSignature<ObjectEventTypes | ElevationParserEventTypes, ObjectEvent, EventsKey> & CombinedOnSignature<ElevationParserEventTypes | ObjectEventTypes | EventTypes, EventsKey>;
once: OnSignature<EventTypes | `${GeneralEventTypes}`, BaseEvent, EventsKey> & OnSignature<ObjectEventTypes | ElevationParserEventTypes, ObjectEvent, EventsKey> & CombinedOnSignature<ElevationParserEventTypes | ObjectEventTypes | EventTypes, EventsKey>;
un: OnSignature<EventTypes, BaseEvent, void> & OnSignature<ObjectEventTypes | ElevationParserEventTypes, ObjectEvent, void> & CombinedOnSignature<ElevationParserEventTypes | ObjectEventTypes | EventTypes | `${GeneralEventTypes}`, void>;
constructor(options: Options);
/**
* Get Feature's elevation values.
* Use custom options to overwrite the general ones for specific cases
*
* @param feature
* @param customOptions
* @returns
* @public
*/
getElevationValues(feature: Feature<LineString | Point | Polygon>): Promise<IGetElevationValues | Error>;
getElevationValues(feature: Feature<LineString | Point | Polygon>, customOptions?: ElevationValuesIndividualOptions): Promise<IGetElevationValues | Error>;
/**
* @public
* @returns
Expand Down Expand Up @@ -132,6 +135,22 @@ export default class ElevationParser extends Control {
* @param timeout
*/
setTimeout(timeout: Options['timeout'], silent?: boolean): void;
/**
* Maximum tile resolution of the image source
* Only if the source is a raster
*
* @public
* @returns
*/
getMaxTilesResolution(): number;
/**
* Current view resolution
* Unsupported if the view of a GeoTIFF is used in the map
*
* @public
* @returns
*/
getCurrentViewResolution(): number;
/**
* @public
* @param map
Expand All @@ -141,6 +160,7 @@ export default class ElevationParser extends Control {
/**
*
* @param coords
* @param optOptions To overwrite the general ones
* @returns
* @private
*/
Expand All @@ -154,17 +174,24 @@ export default class ElevationParser extends Control {
* @private
*/
private _addPropertyEvents;
/**
* Run on init or every time the source is modified
* @private
*/
private _onInitModifySource;
/**
* Get some sample coords from the geometry while preserving the vertices.
*
* @param feature
* @param params
* @returns
* @private
*/
private _sampleFeatureCoords;
/**
*
* @param coordinate
* @param tilesResolution
* @returns
* @private
*/
Expand All @@ -179,6 +206,9 @@ export default class ElevationParser extends Control {
*/
private _getZValuesFromWMS;
}
export declare enum GeneralEventTypes {
LOAD = "load"
}
/**
* **_[interface]_**
* @private
Expand Down Expand Up @@ -248,6 +278,16 @@ export type RasterSources = TileWMS | TileImage | XYZ | GeoTIFF;
* @public
*/
export type CustomSourceFn = (originalFeature: Feature<LineString | Point | Polygon>, sampledCoords: ISampledGeom['sampledCoords']) => Promise<IElevationCoords>;
/**
* **_[type]_**
* @public
*/
export interface ElevationValuesIndividualOptions {
samples?: Options['samples'];
sampleSizeArea?: Options['sampleSizeArea'];
tilesResolution?: Options['tilesResolution'];
smooth?: Options['smooth'];
}
/**
* **_[interface]_**
* @public
Expand Down Expand Up @@ -287,10 +327,12 @@ export interface Options extends Omit<ControlOptions, 'target'> {
* If `max`, the tiles will be downloaded using the maximum quality possible, but you
* have to configure the `maxZoom` attribute of the source to prevent requesting inexisting tiles.
* Using `max` provides the maximum quality, but the requests are gonna be in higher number and would be slower.
* Use the method `getMaxTilesResolution` to get the max resolution in a number number.
*
* ´current´ uses the current view resolution of the map. If the source is visible in the map,
* the already downloaded tiles would be used to the calculations so is it's the faster method.
* Doesn't work if source is GeoTIFF and the map is used the view
* Use the method `getCurrentViewResolution` to get the curent view resolution number.
* Doesn't work if the source is GeoTIFF and the map use its `view`
*
* ´current´ is the default
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/ol-elevation-parser.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d358988

Please sign in to comment.