diff --git a/@here/harp-datasource-protocol/lib/TechniqueParams.ts b/@here/harp-datasource-protocol/lib/TechniqueParams.ts index efb3e3d1c5..9f5a01fdd4 100644 --- a/@here/harp-datasource-protocol/lib/TechniqueParams.ts +++ b/@here/harp-datasource-protocol/lib/TechniqueParams.ts @@ -24,6 +24,7 @@ export type MetricUnit = "Meter" | "Pixel"; /** * Standard kinds of geometry. + * @deprecated See {@link BaseTechniqueParams.kind}. */ export enum StandardGeometryKind { /** @@ -99,6 +100,7 @@ export enum StandardGeometryKind { *``` * If specified in this way, specific types of data (here: highway roads) can be enabled and/or * disabled. + * @deprecated See {@link BaseTechniqueParams.kind}. */ export type GeometryKind = string | StandardGeometryKind; @@ -240,6 +242,7 @@ export interface BaseTechniqueParams { * One kind is set as default in the technique, and can be overridden in the style. * * @deprecated Use {@link enabled} with expressions based on `['dynamic-properties']` operator. + * See "object picking" example. */ kind?: GeometryKind | GeometryKindSet; diff --git a/@here/harp-mapview/lib/MapView.ts b/@here/harp-mapview/lib/MapView.ts index 695e2e25f1..f5dd0bc42d 100644 --- a/@here/harp-mapview/lib/MapView.ts +++ b/@here/harp-mapview/lib/MapView.ts @@ -1206,6 +1206,7 @@ export class MapView extends EventDispatcher { /** * The [[TileGeometryManager]] manages geometry during loading and handles hiding geometry of * specified [[GeometryKind]]s. + * @deprecated */ get tileGeometryManager(): TileGeometryManager | undefined { return this.m_tileGeometryManager; diff --git a/@here/harp-mapview/lib/geometry/TileGeometryManager.ts b/@here/harp-mapview/lib/geometry/TileGeometryManager.ts index 7696008967..949e1bb531 100644 --- a/@here/harp-mapview/lib/geometry/TileGeometryManager.ts +++ b/@here/harp-mapview/lib/geometry/TileGeometryManager.ts @@ -14,15 +14,20 @@ type TileUpdateCallback = (tile: Tile) => void; /** * Manages the content (the geometries) of a tile. + * @internal */ export class TileGeometryManager { /** * The set of geometry kinds that is enabled. Their geometry will be created after decoding. + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. */ get enabledGeometryKinds(): GeometryKindSet { return this.enabledKinds; } + /** + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. + */ set enabledGeometryKinds(kinds: GeometryKindSet) { this.enabledKinds = kinds; } @@ -30,11 +35,15 @@ export class TileGeometryManager { /** * The set of geometry kinds that is disabled. Their geometry will not be created after * decoding. + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. */ get disabledGeometryKinds(): GeometryKindSet { return this.disabledKinds; } + /** + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. + */ set disabledGeometryKinds(kinds: GeometryKindSet) { this.disabledKinds = kinds; } @@ -42,11 +51,15 @@ export class TileGeometryManager { /** * The set of geometry kinds that is hidden. Their geometry may be created, but it is hidden * until the method `hideKind` with an argument of `addOrRemoveToHiddenSet:false` is called. + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. */ get hiddenGeometryKinds(): GeometryKindSet { return this.hiddenKinds; } + /** + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. + */ set hiddenGeometryKinds(kinds: GeometryKindSet) { this.hiddenKinds = kinds; this.incrementVisibilityCounter(); @@ -55,6 +68,7 @@ export class TileGeometryManager { /** * If set to `true`, the filters of enabled/disabledGeometryKinds are applied, otherwise they * are ignored. + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. */ enableFilterByKind: boolean = true; @@ -121,6 +135,7 @@ export class TileGeometryManager { * from the enabled set. * @param {boolean} addOrRemoveToEnabledSet Pass in `true` to add the kind to the set, pass in * `false` to remove from that set. + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. */ enableKind( kind: GeometryKind | GeometryKind[] | GeometryKindSet, @@ -136,6 +151,7 @@ export class TileGeometryManager { * from the disabled set. * @param {boolean} addOrRemoveToHiddenSet Pass in `true` to add the kind to the set, pass in * `false` to remove from that set. + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. */ disableKind( kind: GeometryKind | GeometryKind[] | GeometryKindSet, @@ -151,6 +167,7 @@ export class TileGeometryManager { * from the hidden set. * @param {boolean} addOrRemoveToHiddenSet Pass in `true` to hide the kind(s), `false` to show * it again. + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. */ hideKind( kind: GeometryKind | GeometryKind[] | GeometryKindSet, @@ -182,6 +199,7 @@ export class TileGeometryManager { * * @param {IterableIterator} tiles The * @returns {GeometryKindSet} + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. */ getAvailableKinds(tiles: IterableIterator): GeometryKindSet { const visibleKinds: GeometryKindSet = new GeometryKindSet(); diff --git a/@here/harp-vectortile-datasource/lib/OmvDataFilter.ts b/@here/harp-vectortile-datasource/lib/OmvDataFilter.ts index 8c45a71f64..54db1de0cc 100644 --- a/@here/harp-vectortile-datasource/lib/OmvDataFilter.ts +++ b/@here/harp-vectortile-datasource/lib/OmvDataFilter.ts @@ -30,6 +30,7 @@ import { export interface OmvFeatureFilter { /** * Returns `true` if the filter contains rules for specific kinds. + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. */ hasKindFilter: boolean; @@ -73,6 +74,7 @@ export interface OmvFeatureFilter { * * @param {(string | string[])} kind Tag "kind" of the tag. * @returns {boolean} + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. */ wantsKind(kind: string | string[]): boolean; } @@ -328,6 +330,7 @@ export class OmvFeatureFilterDescriptionBuilder { * Add all the specified strings as "enabledKinds". * * @param {string[]} enabledKinds List of kinds that should be generated. + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. */ processKinds(enabledKinds: string[]) { this.m_kindsToProcess = this.m_kindsToProcess.concat(enabledKinds); @@ -337,6 +340,7 @@ export class OmvFeatureFilterDescriptionBuilder { * Add all the specified strings as "disabledKinds". * * @param {string[]} disabledKinds List of kinds that should _not_ be generated. + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. */ ignoreKinds(disabledKinds: string[]) { this.m_kindsToIgnore = this.m_kindsToIgnore.concat(disabledKinds); @@ -631,6 +635,9 @@ export class OmvGenericFeatureFilter implements OmvFeatureFilter { ); } + /** + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. + */ wantsKind(kind: string | string[]): boolean { // undefined -> no way to filter if (kind === undefined) { @@ -647,6 +654,9 @@ export class OmvGenericFeatureFilter implements OmvFeatureFilter { ); } + /** + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. + */ get hasKindFilter(): boolean { return this.enabledKinds !== undefined || this.disabledKinds !== undefined; } @@ -698,6 +708,9 @@ export class OmvGenericFeatureFilter implements OmvFeatureFilter { export class ComposedDataFilter implements OmvFeatureFilter { constructor(readonly filters: OmvFeatureFilter[]) {} + /** + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. + */ get hasKindFilter() { return this.filters.reduce( (result, filter) => result && filter.hasKindFilter, @@ -733,6 +746,9 @@ export class ComposedDataFilter implements OmvFeatureFilter { ); } + /** + * @deprecated See {@link @here/here-datasource-protocol/BaseTechniqueParams.kind}. + */ wantsKind(kind: string | string[]): boolean { return this.filters.reduce( (result, filter) => result && filter.wantsKind(kind),