@itwin/core-frontend 5.13.0-dev.15 → 5.13.0-dev.17
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/lib/cjs/IModelApp.d.ts +11 -1
- package/lib/cjs/IModelApp.d.ts.map +1 -1
- package/lib/cjs/IModelApp.js +14 -1
- package/lib/cjs/IModelApp.js.map +1 -1
- package/lib/cjs/IModeljs-css.d.ts.map +1 -1
- package/lib/cjs/IModeljs-css.js +4 -2
- package/lib/cjs/IModeljs-css.js.map +1 -1
- package/lib/cjs/RealityDataSource.d.ts.map +1 -1
- package/lib/cjs/RealityDataSource.js +7 -4
- package/lib/cjs/RealityDataSource.js.map +1 -1
- package/lib/cjs/internal/GoogleMapsDecorator.js +1 -1
- package/lib/cjs/internal/GoogleMapsDecorator.js.map +1 -1
- package/lib/cjs/internal/tile/OrbitGtTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/OrbitGtTileTree.js +5 -1
- package/lib/cjs/internal/tile/OrbitGtTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.js +5 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/map/ArcGisUtilities.d.ts +3 -0
- package/lib/cjs/internal/tile/map/ArcGisUtilities.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ArcGisUtilities.js +32 -4
- package/lib/cjs/internal/tile/map/ArcGisUtilities.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISImageryProvider.js +28 -6
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +7 -3
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js +1 -7
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js +4 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js +6 -2
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/WmsUtilities.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/WmsUtilities.js +25 -4
- package/lib/cjs/internal/tile/map/WmsUtilities.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts +74 -0
- package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.js +114 -2
- package/lib/cjs/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryFormats.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryFormats.js +16 -0
- package/lib/cjs/tile/map/MapLayerImageryFormats.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +118 -2
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js +230 -20
- package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerSources.d.ts +7 -1
- package/lib/cjs/tile/map/MapLayerSources.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerSources.js +6 -0
- package/lib/cjs/tile/map/MapLayerSources.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerTileTreeReference.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerTileTreeReference.js +1 -3
- package/lib/cjs/tile/map/MapLayerTileTreeReference.js.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.js +3 -1
- package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
- package/lib/esm/IModelApp.d.ts +11 -1
- package/lib/esm/IModelApp.d.ts.map +1 -1
- package/lib/esm/IModelApp.js +14 -1
- package/lib/esm/IModelApp.js.map +1 -1
- package/lib/esm/IModeljs-css.d.ts.map +1 -1
- package/lib/esm/IModeljs-css.js +4 -2
- package/lib/esm/IModeljs-css.js.map +1 -1
- package/lib/esm/RealityDataSource.d.ts.map +1 -1
- package/lib/esm/RealityDataSource.js +7 -4
- package/lib/esm/RealityDataSource.js.map +1 -1
- package/lib/esm/internal/GoogleMapsDecorator.js +1 -1
- package/lib/esm/internal/GoogleMapsDecorator.js.map +1 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.js +5 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.js.map +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.js +5 -1
- package/lib/esm/internal/tile/RealityModelTileTree.js.map +1 -1
- package/lib/esm/internal/tile/map/ArcGisUtilities.d.ts +3 -0
- package/lib/esm/internal/tile/map/ArcGisUtilities.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ArcGisUtilities.js +33 -5
- package/lib/esm/internal/tile/map/ArcGisUtilities.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISImageryProvider.js +29 -7
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +8 -4
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js +1 -7
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/WmsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js +5 -2
- package/lib/esm/internal/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js +7 -3
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/WmsUtilities.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/WmsUtilities.js +25 -4
- package/lib/esm/internal/tile/map/WmsUtilities.js.map +1 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts +74 -0
- package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.js +113 -2
- package/lib/esm/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryFormats.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryFormats.js +17 -1
- package/lib/esm/tile/map/MapLayerImageryFormats.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +118 -2
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js +228 -20
- package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/MapLayerSources.d.ts +7 -1
- package/lib/esm/tile/map/MapLayerSources.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerSources.js +6 -0
- package/lib/esm/tile/map/MapLayerSources.js.map +1 -1
- package/lib/esm/tile/map/MapLayerTileTreeReference.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerTileTreeReference.js +1 -3
- package/lib/esm/tile/map/MapLayerTileTreeReference.js.map +1 -1
- package/lib/esm/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/esm/tile/map/MapTileTree.js +4 -2
- package/lib/esm/tile/map/MapTileTree.js.map +1 -1
- package/package.json +20 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLayerSources.js","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerSources.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAoE;AACpE,oDAE4B;AAC5B,wDAA+C;AAC/C,+CAA4C;AAE5C,mDAAyE;AACzE,0CAA2F;AAE3F;;GAEG;AACH,IAAY,oBAkBX;AAlBD,WAAY,oBAAoB;IAC9B,4BAA4B;IAC5B,iEAAK,CAAA;IACL,iEAAiE;IACjE,2FAAkB,CAAA;IAClB,6EAA6E;IAC7E,iFAAa,CAAA;IACb,uDAAuD;IACvD,qFAAe,CAAA;IACf,oEAAoE;IACpE,2EAAU,CAAA;IACV,iEAAiE;IACjE,6EAAW,CAAA;IACX,mDAAmD;IACnD,qGAAuB,CAAA;IACvB;OACG;IACH,2FAAkB,CAAA;AACpB,CAAC,EAlBW,oBAAoB,oCAApB,oBAAoB,QAkB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CAAC,CAAC,CAAiB,EAAE,CAAiB,EAAE,EAAE,CAAC,IAAA,6BAAc,EAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QAC9I,OAAO,eAAe,CAAC,SAAS,CAAC;IACnC,CAAC;IAEM,MAAM,CAAC,iBAAiB,CAAC,IAAY;QAC1C,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC;YAC/B,OAAO,KAAK,CAAC;QACf,CAAC;QAED,mCAAmC;QACnC,MAAM,kBAAkB,GAAG,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC;QACrE,eAAe,CAAC,SAAS,CAAC,QAAQ,GAAG,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE;YACxF,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,kBAAkB,KAAK,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC5E,CAAC;CACF;AAzID,0CAyIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module MapLayers\r\n */\r\n\r\nimport { compareStrings, expectDefined } from \"@itwin/core-bentley\";\r\nimport {\r\n BackgroundMapProvider, BackgroundMapType, BaseMapLayerSettings, DeprecatedBackgroundMapProps, ImageMapLayerSettings, MapSubLayerProps,\r\n} from \"@itwin/core-common\";\r\nimport { Point2d } from \"@itwin/core-geometry\";\r\nimport { IModelApp } from \"../../IModelApp\";\r\nimport { IModelConnection } from \"../../IModelConnection\";\r\nimport { request, RequestBasicCredentials } from \"../../request/Request\";\r\nimport { ArcGisUtilities, MapCartoRectangle, MapLayerSourceValidation } from \"../internal\";\r\n\r\n/** Values for return codes from [[MapLayerSource.validateSource]]\r\n * @public\r\n */\r\nexport enum MapLayerSourceStatus {\r\n /** Layer source is valid */\r\n Valid,\r\n /** Authorization has failed when accessing this layer source. */\r\n InvalidCredentials,\r\n /** Provided format id could not be resolved in [[MapLayerFormatRegistry]] */\r\n InvalidFormat,\r\n /** The tiling schema of the source is not supported */\r\n InvalidTileTree,\r\n /** Could not not connect to remote server using the provided URL.*/\r\n InvalidUrl,\r\n /** Authorization is required to access this map layer source. */\r\n RequireAuth,\r\n /** Map-layer coordinate system is not supported */\r\n InvalidCoordinateSystem,\r\n /** Format is not compatible with the URL provided.\r\n */\r\n IncompatibleFormat,\r\n}\r\n\r\n/** JSON representation of a map layer source.\r\n * @see [ImageryMapLayerFormatId]($common)\r\n * @public\r\n */\r\nexport interface MapLayerSourceProps {\r\n /** Identifies the map layers source. Defaults to 'WMS'. */\r\n formatId?: string;\r\n /** Name */\r\n name: string;\r\n /** URL of the source's endpoint. */\r\n url: string;\r\n /** True to indicate background is transparent. Defaults to 'true'. */\r\n transparentBackground?: boolean;\r\n /** Indicate if this source definition should be used as a base map. Defaults to false. */\r\n baseMap?: boolean;\r\n\r\n /** List of query parameters that will get appended to the source.\r\n * @beta\r\n */\r\n queryParams?: { [key: string]: string };\r\n}\r\n\r\n/** A source for map layers. These may be catalogued for convenient use by users or applications.\r\n * @public\r\n */\r\nexport class MapLayerSource {\r\n public formatId: string;\r\n public name: string;\r\n public url: string;\r\n public baseMap = false;\r\n public transparentBackground?: boolean;\r\n public userName?: string;\r\n public password?: string;\r\n\r\n /** List of query parameters that will get appended to the source URL that should be be persisted part of the JSON representation.\r\n * @beta\r\n */\r\n public savedQueryParams?: { [key: string]: string };\r\n\r\n /** List of query parameters that will get appended to the source URL that should *not* be be persisted part of the JSON representation.\r\n * @beta\r\n */\r\n public unsavedQueryParams?: { [key: string]: string };\r\n\r\n private constructor(formatId = \"WMS\", name: string, url: string, baseMap = false, transparentBackground = true, savedQueryParams?: { [key: string]: string}) {\r\n this.formatId = formatId;\r\n this.name = name;\r\n this.url = url;\r\n this.baseMap = baseMap;\r\n this.transparentBackground = transparentBackground;\r\n this.savedQueryParams = savedQueryParams;\r\n }\r\n\r\n public static fromJSON(json: MapLayerSourceProps): MapLayerSource | undefined {\r\n if (json === undefined)\r\n return undefined;\r\n\r\n return new MapLayerSource(json.formatId, json.name, json.url, json.baseMap, json.transparentBackground, json.queryParams);\r\n }\r\n\r\n public async validateSource(ignoreCache?: boolean): Promise<MapLayerSourceValidation> {\r\n return IModelApp.mapLayerFormatRegistry.validateSource({source: this, ignoreCache});\r\n }\r\n\r\n /** @internal*/\r\n public static fromBackgroundMapProps(props: DeprecatedBackgroundMapProps) {\r\n const provider = BackgroundMapProvider.fromBackgroundMapProps(props);\r\n const layerSettings = BaseMapLayerSettings.fromProvider(provider);\r\n if (undefined !== layerSettings) {\r\n const source = MapLayerSource.fromJSON(layerSettings);\r\n if (source) {\r\n source.baseMap = true;\r\n return source;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n public toJSON(): Omit<MapLayerSourceProps, \"formatId\"> & {formatId: string} {\r\n return { url: this.url, name: this.name, formatId: this.formatId, transparentBackground: this.transparentBackground, queryParams: this.savedQueryParams };\r\n }\r\n\r\n public toLayerSettings(subLayers?: MapSubLayerProps[]): ImageMapLayerSettings | undefined {\r\n // When MapLayerSetting is created from a MapLayerSource, sub-layers and credentials need to be set separately.\r\n const layerSettings = ImageMapLayerSettings.fromJSON({ ...this, subLayers });\r\n if (this.userName !== undefined || this.password !== undefined) {\r\n layerSettings?.setCredentials(this.userName, this.password);\r\n }\r\n\r\n if (this.savedQueryParams) {\r\n layerSettings.savedQueryParams = {...this.savedQueryParams};\r\n }\r\n\r\n if (this.unsavedQueryParams) {\r\n layerSettings.unsavedQueryParams = {...this.unsavedQueryParams};\r\n }\r\n return layerSettings;\r\n }\r\n\r\n private getCredentials(): RequestBasicCredentials | undefined {\r\n return this.userName && this.password ? { user: this.userName, password: this.password } : undefined;\r\n }\r\n\r\n /** Collect all query parameters\r\n * @beta\r\n */\r\n public collectQueryParams() {\r\n let queryParams: {[key: string]: string} = {};\r\n\r\n if (this.savedQueryParams)\r\n queryParams = {...this.savedQueryParams};\r\n if (this.unsavedQueryParams)\r\n queryParams = {...queryParams, ...this.unsavedQueryParams};\r\n return queryParams;\r\n }\r\n\r\n}\r\n\r\n/** A collection of [[MapLayerSource]] objects.\r\n * @beta\r\n */\r\nexport class MapLayerSources {\r\n private static _instance?: MapLayerSources;\r\n private constructor(private _sources: MapLayerSource[]) { }\r\n\r\n public static getInstance() { return MapLayerSources._instance; }\r\n\r\n public findByName(name: string, baseMap: boolean = false): MapLayerSource | undefined {\r\n const nameTest = name.toLowerCase();\r\n for (const source of this._sources)\r\n if (source.baseMap === baseMap && source.name.toLowerCase().indexOf(nameTest) !== -1)\r\n return source;\r\n\r\n return undefined;\r\n }\r\n public get layers(): MapLayerSource[] {\r\n const layers = new Array<MapLayerSource>();\r\n this._sources.forEach((source) => {\r\n if (!source.baseMap)\r\n layers.push(source);\r\n });\r\n\r\n return layers;\r\n }\r\n public get allSource() { return this._sources; }\r\n public get bases(): MapLayerSource[] {\r\n const layers = new Array<MapLayerSource>();\r\n this._sources.forEach((source) => {\r\n if (source.baseMap)\r\n layers.push(source);\r\n });\r\n\r\n return layers;\r\n }\r\n\r\n private static getBingMapLayerSource(): MapLayerSource[] {\r\n const mapLayerSources: MapLayerSource[] = [];\r\n // We know these hard-coded sources are valid, so ! is okay here.\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"BingProvider\", providerData: { mapType: BackgroundMapType.Street } })!);\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"BingProvider\", providerData: { mapType: BackgroundMapType.Aerial } })!);\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"BingProvider\", providerData: { mapType: BackgroundMapType.Hybrid } })!);\r\n return mapLayerSources;\r\n }\r\n\r\n private static getMapBoxLayerSource(): MapLayerSource[] {\r\n const mapLayerSources: MapLayerSource[] = [];\r\n // We know these hard-coded sources are valid, so ! is okay here.\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"MapBoxProvider\", providerData: { mapType: BackgroundMapType.Street } })!);\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"MapBoxProvider\", providerData: { mapType: BackgroundMapType.Aerial } })!);\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"MapBoxProvider\", providerData: { mapType: BackgroundMapType.Hybrid } })!);\r\n return mapLayerSources;\r\n }\r\n\r\n public static async create(iModel?: IModelConnection, queryForPublicSources = false, addMapBoxSources = false): Promise<MapLayerSources> {\r\n if (!queryForPublicSources && MapLayerSources._instance)\r\n return MapLayerSources._instance;\r\n\r\n if (!iModel)\r\n iModel = IModelApp.viewManager.selectedView ? IModelApp.viewManager.selectedView.iModel : undefined;\r\n\r\n let sourceRange = MapCartoRectangle.createMaximum();\r\n if (iModel) {\r\n const projectCenter = expectDefined(iModel.projectExtents.localXYZToWorld(.5, .5, .5));\r\n const cartoCenter = iModel.spatialToCartographicFromEcef(projectCenter);\r\n const globeRange = MapCartoRectangle.createMaximum();\r\n const nearDelta = Point2d.create(globeRange.xLength() / 100, globeRange.yLength() / 100);\r\n sourceRange = MapCartoRectangle.fromRadians(cartoCenter.longitude - nearDelta.x, cartoCenter.latitude - nearDelta.y, cartoCenter.longitude + nearDelta.x, cartoCenter.latitude + nearDelta.y);\r\n }\r\n\r\n const sources = new Array<MapLayerSource>();\r\n const urlSet = new Set<string>();\r\n const addSource = ((source: MapLayerSource) => {\r\n if (!urlSet.has(source.url)) {\r\n sources.push(source);\r\n urlSet.add(source.url);\r\n }\r\n });\r\n\r\n this.getBingMapLayerSource().forEach((source) => {\r\n addSource(source);\r\n });\r\n\r\n if (addMapBoxSources) {\r\n this.getMapBoxLayerSource().forEach((source) => {\r\n addSource(source);\r\n });\r\n }\r\n\r\n if (queryForPublicSources) {\r\n const sourcesJson = await request(`${IModelApp.publicPath}assets/MapLayerSources.json`, \"json\");\r\n\r\n for (const sourceJson of sourcesJson) {\r\n const source = MapLayerSource.fromJSON(sourceJson);\r\n if (source)\r\n addSource(source);\r\n }\r\n\r\n (await ArcGisUtilities.getSourcesFromQuery(sourceRange)).forEach((queriedSource) => addSource(queriedSource));\r\n }\r\n\r\n sources.sort((a: MapLayerSource, b: MapLayerSource) => compareStrings(a.name.toLowerCase(), b.name.toLowerCase()));\r\n\r\n const mapLayerSources = new MapLayerSources(sources);\r\n MapLayerSources._instance = mapLayerSources;\r\n\r\n return mapLayerSources;\r\n }\r\n public static async addSourceToMapLayerSources(mapLayerSource?: MapLayerSource): Promise<MapLayerSources | undefined> {\r\n if (!MapLayerSources._instance || !mapLayerSource) {\r\n return undefined;\r\n }\r\n MapLayerSources._instance._sources = MapLayerSources._instance._sources.filter((source) => {\r\n return !(source.name === mapLayerSource.name || source.url === mapLayerSource.url);\r\n });\r\n\r\n MapLayerSources._instance._sources.push(mapLayerSource);\r\n MapLayerSources._instance._sources.sort((a: MapLayerSource, b: MapLayerSource) => compareStrings(a.name.toLowerCase(), b.name.toLowerCase()));\r\n return MapLayerSources._instance;\r\n }\r\n\r\n public static removeLayerByName(name: string): boolean {\r\n if (!MapLayerSources._instance) {\r\n return false;\r\n }\r\n\r\n // For now we only rely on the name\r\n const lengthBeforeRemove = MapLayerSources._instance._sources.length;\r\n MapLayerSources._instance._sources = MapLayerSources._instance._sources.filter((source) => {\r\n return (source.name !== name);\r\n });\r\n return (lengthBeforeRemove !== MapLayerSources._instance._sources.length);\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"MapLayerSources.js","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerSources.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAoE;AACpE,oDAE4B;AAC5B,wDAA+C;AAC/C,+CAA4C;AAE5C,mDAAyE;AACzE,0CAA2F;AAE3F;;GAEG;AACH,IAAY,oBAwBX;AAxBD,WAAY,oBAAoB;IAC9B,4BAA4B;IAC5B,iEAAK,CAAA;IACL,iEAAiE;IACjE,2FAAkB,CAAA;IAClB,6EAA6E;IAC7E,iFAAa,CAAA;IACb,uDAAuD;IACvD,qFAAe,CAAA;IACf,oEAAoE;IACpE,2EAAU,CAAA;IACV,iEAAiE;IACjE,6EAAW,CAAA;IACX,mDAAmD;IACnD,qGAAuB,CAAA;IACvB;OACG;IACH,2FAAkB,CAAA;IAClB;;;;OAIG;IACH,qFAAe,CAAA;AACjB,CAAC,EAxBW,oBAAoB,oCAApB,oBAAoB,QAwB/B;AAwBD;;GAEG;AACH,MAAa,cAAc;IAClB,QAAQ,CAAS;IACjB,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,OAAO,GAAG,KAAK,CAAC;IAChB,qBAAqB,CAAW;IAChC,QAAQ,CAAU;IAClB,QAAQ,CAAU;IAEzB;;MAEE;IACK,gBAAgB,CAA6B;IAEpD;;MAEE;IACK,kBAAkB,CAA6B;IAEtD,YAAoB,QAAQ,GAAG,KAAK,EAAE,IAAY,EAAE,GAAW,EAAE,OAAO,GAAG,KAAK,EAAE,qBAAqB,GAAG,IAAI,EAAE,gBAA2C;QACzJ,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,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AM,EAAE,EAAE;YACxF,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,kBAAkB,KAAK,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC5E,CAAC;CACF;AAzID,0CAyIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module MapLayers\r\n */\r\n\r\nimport { compareStrings, expectDefined } from \"@itwin/core-bentley\";\r\nimport {\r\n BackgroundMapProvider, BackgroundMapType, BaseMapLayerSettings, DeprecatedBackgroundMapProps, ImageMapLayerSettings, MapSubLayerProps,\r\n} from \"@itwin/core-common\";\r\nimport { Point2d } from \"@itwin/core-geometry\";\r\nimport { IModelApp } from \"../../IModelApp\";\r\nimport { IModelConnection } from \"../../IModelConnection\";\r\nimport { request, RequestBasicCredentials } from \"../../request/Request\";\r\nimport { ArcGisUtilities, MapCartoRectangle, MapLayerSourceValidation } from \"../internal\";\r\n\r\n/** Values for return codes from [[MapLayerSource.validateSource]]\r\n * @public\r\n */\r\nexport enum MapLayerSourceStatus {\r\n /** Layer source is valid */\r\n Valid,\r\n /** Authorization has failed when accessing this layer source. */\r\n InvalidCredentials,\r\n /** Provided format id could not be resolved in [[MapLayerFormatRegistry]] */\r\n InvalidFormat,\r\n /** The tiling schema of the source is not supported */\r\n InvalidTileTree,\r\n /** Could not not connect to remote server using the provided URL.*/\r\n InvalidUrl,\r\n /** Authorization is required to access this map layer source. */\r\n RequireAuth,\r\n /** Map-layer coordinate system is not supported */\r\n InvalidCoordinateSystem,\r\n /** Format is not compatible with the URL provided.\r\n */\r\n IncompatibleFormat,\r\n /** Authentication could not be attempted because the source's origin is not trusted\r\n * (see [MapLayerFormatRegistry.restrictCredentialsToTrustedOrigins]($frontend)). Add the origin to\r\n * [MapLayerFormatRegistry.trustedCredentialsOrigins]($frontend) rather than prompting for credentials.\r\n * @beta\r\n */\r\n UntrustedOrigin,\r\n}\r\n\r\n/** JSON representation of a map layer source.\r\n * @see [ImageryMapLayerFormatId]($common)\r\n * @public\r\n */\r\nexport interface MapLayerSourceProps {\r\n /** Identifies the map layers source. Defaults to 'WMS'. */\r\n formatId?: string;\r\n /** Name */\r\n name: string;\r\n /** URL of the source's endpoint. */\r\n url: string;\r\n /** True to indicate background is transparent. Defaults to 'true'. */\r\n transparentBackground?: boolean;\r\n /** Indicate if this source definition should be used as a base map. Defaults to false. */\r\n baseMap?: boolean;\r\n\r\n /** List of query parameters that will get appended to the source.\r\n * @beta\r\n */\r\n queryParams?: { [key: string]: string };\r\n}\r\n\r\n/** A source for map layers. These may be catalogued for convenient use by users or applications.\r\n * @public\r\n */\r\nexport class MapLayerSource {\r\n public formatId: string;\r\n public name: string;\r\n public url: string;\r\n public baseMap = false;\r\n public transparentBackground?: boolean;\r\n public userName?: string;\r\n public password?: string;\r\n\r\n /** List of query parameters that will get appended to the source URL that should be be persisted part of the JSON representation.\r\n * @beta\r\n */\r\n public savedQueryParams?: { [key: string]: string };\r\n\r\n /** List of query parameters that will get appended to the source URL that should *not* be be persisted part of the JSON representation.\r\n * @beta\r\n */\r\n public unsavedQueryParams?: { [key: string]: string };\r\n\r\n private constructor(formatId = \"WMS\", name: string, url: string, baseMap = false, transparentBackground = true, savedQueryParams?: { [key: string]: string}) {\r\n this.formatId = formatId;\r\n this.name = name;\r\n this.url = url;\r\n this.baseMap = baseMap;\r\n this.transparentBackground = transparentBackground;\r\n this.savedQueryParams = savedQueryParams;\r\n }\r\n\r\n public static fromJSON(json: MapLayerSourceProps): MapLayerSource | undefined {\r\n if (json === undefined)\r\n return undefined;\r\n\r\n return new MapLayerSource(json.formatId, json.name, json.url, json.baseMap, json.transparentBackground, json.queryParams);\r\n }\r\n\r\n public async validateSource(ignoreCache?: boolean): Promise<MapLayerSourceValidation> {\r\n return IModelApp.mapLayerFormatRegistry.validateSource({source: this, ignoreCache});\r\n }\r\n\r\n /** @internal*/\r\n public static fromBackgroundMapProps(props: DeprecatedBackgroundMapProps) {\r\n const provider = BackgroundMapProvider.fromBackgroundMapProps(props);\r\n const layerSettings = BaseMapLayerSettings.fromProvider(provider);\r\n if (undefined !== layerSettings) {\r\n const source = MapLayerSource.fromJSON(layerSettings);\r\n if (source) {\r\n source.baseMap = true;\r\n return source;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n public toJSON(): Omit<MapLayerSourceProps, \"formatId\"> & {formatId: string} {\r\n return { url: this.url, name: this.name, formatId: this.formatId, transparentBackground: this.transparentBackground, queryParams: this.savedQueryParams };\r\n }\r\n\r\n public toLayerSettings(subLayers?: MapSubLayerProps[]): ImageMapLayerSettings | undefined {\r\n // When MapLayerSetting is created from a MapLayerSource, sub-layers and credentials need to be set separately.\r\n const layerSettings = ImageMapLayerSettings.fromJSON({ ...this, subLayers });\r\n if (this.userName !== undefined || this.password !== undefined) {\r\n layerSettings?.setCredentials(this.userName, this.password);\r\n }\r\n\r\n if (this.savedQueryParams) {\r\n layerSettings.savedQueryParams = {...this.savedQueryParams};\r\n }\r\n\r\n if (this.unsavedQueryParams) {\r\n layerSettings.unsavedQueryParams = {...this.unsavedQueryParams};\r\n }\r\n return layerSettings;\r\n }\r\n\r\n private getCredentials(): RequestBasicCredentials | undefined {\r\n return this.userName && this.password ? { user: this.userName, password: this.password } : undefined;\r\n }\r\n\r\n /** Collect all query parameters\r\n * @beta\r\n */\r\n public collectQueryParams() {\r\n let queryParams: {[key: string]: string} = {};\r\n\r\n if (this.savedQueryParams)\r\n queryParams = {...this.savedQueryParams};\r\n if (this.unsavedQueryParams)\r\n queryParams = {...queryParams, ...this.unsavedQueryParams};\r\n return queryParams;\r\n }\r\n\r\n}\r\n\r\n/** A collection of [[MapLayerSource]] objects.\r\n * @beta\r\n */\r\nexport class MapLayerSources {\r\n private static _instance?: MapLayerSources;\r\n private constructor(private _sources: MapLayerSource[]) { }\r\n\r\n public static getInstance() { return MapLayerSources._instance; }\r\n\r\n public findByName(name: string, baseMap: boolean = false): MapLayerSource | undefined {\r\n const nameTest = name.toLowerCase();\r\n for (const source of this._sources)\r\n if (source.baseMap === baseMap && source.name.toLowerCase().indexOf(nameTest) !== -1)\r\n return source;\r\n\r\n return undefined;\r\n }\r\n public get layers(): MapLayerSource[] {\r\n const layers = new Array<MapLayerSource>();\r\n this._sources.forEach((source) => {\r\n if (!source.baseMap)\r\n layers.push(source);\r\n });\r\n\r\n return layers;\r\n }\r\n public get allSource() { return this._sources; }\r\n public get bases(): MapLayerSource[] {\r\n const layers = new Array<MapLayerSource>();\r\n this._sources.forEach((source) => {\r\n if (source.baseMap)\r\n layers.push(source);\r\n });\r\n\r\n return layers;\r\n }\r\n\r\n private static getBingMapLayerSource(): MapLayerSource[] {\r\n const mapLayerSources: MapLayerSource[] = [];\r\n // We know these hard-coded sources are valid, so ! is okay here.\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"BingProvider\", providerData: { mapType: BackgroundMapType.Street } })!);\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"BingProvider\", providerData: { mapType: BackgroundMapType.Aerial } })!);\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"BingProvider\", providerData: { mapType: BackgroundMapType.Hybrid } })!);\r\n return mapLayerSources;\r\n }\r\n\r\n private static getMapBoxLayerSource(): MapLayerSource[] {\r\n const mapLayerSources: MapLayerSource[] = [];\r\n // We know these hard-coded sources are valid, so ! is okay here.\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"MapBoxProvider\", providerData: { mapType: BackgroundMapType.Street } })!);\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"MapBoxProvider\", providerData: { mapType: BackgroundMapType.Aerial } })!);\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n mapLayerSources.push(MapLayerSource.fromBackgroundMapProps({ providerName: \"MapBoxProvider\", providerData: { mapType: BackgroundMapType.Hybrid } })!);\r\n return mapLayerSources;\r\n }\r\n\r\n public static async create(iModel?: IModelConnection, queryForPublicSources = false, addMapBoxSources = false): Promise<MapLayerSources> {\r\n if (!queryForPublicSources && MapLayerSources._instance)\r\n return MapLayerSources._instance;\r\n\r\n if (!iModel)\r\n iModel = IModelApp.viewManager.selectedView ? IModelApp.viewManager.selectedView.iModel : undefined;\r\n\r\n let sourceRange = MapCartoRectangle.createMaximum();\r\n if (iModel) {\r\n const projectCenter = expectDefined(iModel.projectExtents.localXYZToWorld(.5, .5, .5));\r\n const cartoCenter = iModel.spatialToCartographicFromEcef(projectCenter);\r\n const globeRange = MapCartoRectangle.createMaximum();\r\n const nearDelta = Point2d.create(globeRange.xLength() / 100, globeRange.yLength() / 100);\r\n sourceRange = MapCartoRectangle.fromRadians(cartoCenter.longitude - nearDelta.x, cartoCenter.latitude - nearDelta.y, cartoCenter.longitude + nearDelta.x, cartoCenter.latitude + nearDelta.y);\r\n }\r\n\r\n const sources = new Array<MapLayerSource>();\r\n const urlSet = new Set<string>();\r\n const addSource = ((source: MapLayerSource) => {\r\n if (!urlSet.has(source.url)) {\r\n sources.push(source);\r\n urlSet.add(source.url);\r\n }\r\n });\r\n\r\n this.getBingMapLayerSource().forEach((source) => {\r\n addSource(source);\r\n });\r\n\r\n if (addMapBoxSources) {\r\n this.getMapBoxLayerSource().forEach((source) => {\r\n addSource(source);\r\n });\r\n }\r\n\r\n if (queryForPublicSources) {\r\n const sourcesJson = await request(`${IModelApp.publicPath}assets/MapLayerSources.json`, \"json\");\r\n\r\n for (const sourceJson of sourcesJson) {\r\n const source = MapLayerSource.fromJSON(sourceJson);\r\n if (source)\r\n addSource(source);\r\n }\r\n\r\n (await ArcGisUtilities.getSourcesFromQuery(sourceRange)).forEach((queriedSource) => addSource(queriedSource));\r\n }\r\n\r\n sources.sort((a: MapLayerSource, b: MapLayerSource) => compareStrings(a.name.toLowerCase(), b.name.toLowerCase()));\r\n\r\n const mapLayerSources = new MapLayerSources(sources);\r\n MapLayerSources._instance = mapLayerSources;\r\n\r\n return mapLayerSources;\r\n }\r\n public static async addSourceToMapLayerSources(mapLayerSource?: MapLayerSource): Promise<MapLayerSources | undefined> {\r\n if (!MapLayerSources._instance || !mapLayerSource) {\r\n return undefined;\r\n }\r\n MapLayerSources._instance._sources = MapLayerSources._instance._sources.filter((source) => {\r\n return !(source.name === mapLayerSource.name || source.url === mapLayerSource.url);\r\n });\r\n\r\n MapLayerSources._instance._sources.push(mapLayerSource);\r\n MapLayerSources._instance._sources.sort((a: MapLayerSource, b: MapLayerSource) => compareStrings(a.name.toLowerCase(), b.name.toLowerCase()));\r\n return MapLayerSources._instance;\r\n }\r\n\r\n public static removeLayerByName(name: string): boolean {\r\n if (!MapLayerSources._instance) {\r\n return false;\r\n }\r\n\r\n // For now we only rely on the name\r\n const lengthBeforeRemove = MapLayerSources._instance._sources.length;\r\n MapLayerSources._instance._sources = MapLayerSources._instance._sources.filter((source) => {\r\n return (source.name !== name);\r\n });\r\n return (lengthBeforeRemove !== MapLayerSources._instance._sources.length);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLayerTileTreeReference.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerTileTreeReference.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAyB,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,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ree || hit.iModel !== tree.iModel || tree.modelId !== hit.sourceId)
|
|
68
68
|
return undefined;
|
|
69
|
-
const strings = [];
|
|
70
|
-
strings.push(`Map Layer: ${this._layerSettings.name}`);
|
|
71
69
|
const div = document.createElement("div");
|
|
72
|
-
div.
|
|
70
|
+
div.textContent = `Map Layer: ${this._layerSettings.name}`;
|
|
73
71
|
return div;
|
|
74
72
|
}
|
|
75
73
|
decorate(_context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLayerTileTreeReference.js","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerTileTreeReference.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;
|
|
1
|
+
{"version":3,"file":"MapLayerTileTreeReference.js","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerTileTreeReference.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA6FH,kEASC;AApGD,sDAA6C;AAC7C,oDAAoG;AAEpG,+CAA4C;AAE5C,0CAA+G;AAG/G;;;;;;GAMG;AACH,MAAsB,yBAA0B,SAAQ,4BAAiB;IACvE,eAAe;IACL,cAAc,CAAmB;IAC3C,eAAe;IACL,WAAW,CAAS;IAC9B,eAAe;IACR,MAAM,CAAmB;IAEhC;;;;;;OAMG;IACH,YAAY,cAAgC,EAAE,WAAmB,EAAE,MAAwB;QACzF,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,eAAe;IACf,IAAc,aAAa,KAAK,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAEzH,oFAAoF;IACpF,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC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KAAK,CAAC,CAAC;QAC1C,GAAG,CAAC,WAAW,GAAG,cAAc,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;QAC3D,OAAO,GAAG,CAAC;IACb,CAAC;IAEe,QAAQ,CAAC,QAAyB;QAChD,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC;CACF;AAlED,8DAkEC;AAED;;;;;;;GAOG;AACH,SAAgB,2BAA2B,CAAC,aAA+B,EAAE,UAAkB,EAAE,MAAwB;IACvH,IAAI,aAAa,YAAY,mCAAqB,EAAE,CAAC;QACnD,OAAO,IAAA,+CAAoC,EAAC,aAAa,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IACjF,CAAC;SAAM,IAAI,aAAa,YAAY,mCAAqB;QACvD,OAAO,qBAAS,CAAC,sBAAsB,CAAC,yBAAyB,CAAC,aAAa,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;SAClG,CAAC;QACJ,IAAA,qBAAM,EAAE,KAAK,CAAC,CAAC;QACf,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { ImageMapLayerSettings, MapLayerSettings, ModelMapLayerSettings } from \"@itwin/core-common\";\r\nimport { HitDetail } from \"../../HitDetail\";\r\nimport { IModelApp } from \"../../IModelApp\";\r\nimport { IModelConnection } from \"../../IModelConnection\";\r\nimport { createModelMapLayerTileTreeReference, MapLayerImageryProvider, TileTreeReference } from \"../internal\";\r\nimport { DecorateContext } from \"../../ViewContext\";\r\n\r\n/**\r\n * A [[TileTreeReference]] to be used specifically for [[MapTileTree]]s.\r\n * The reference refers to its MapTileTree by way of the tree's [[TileTreeOwner]].\r\n * Multiple MapLayerTileTreeReferences can refer to the same TileTree if the map layer settings are equivalent, meaning\r\n * they have identical format IDs, URLs, credentials, etc.\r\n * @beta\r\n */\r\nexport abstract class MapLayerTileTreeReference extends TileTreeReference {\r\n /* @internal */\r\n protected _layerSettings: MapLayerSettings;\r\n /* @internal */\r\n protected _layerIndex: number;\r\n /* @internal */\r\n public iModel: IModelConnection;\r\n\r\n /**\r\n * Constructor for a MapLayerTileTreeReference.\r\n * @param _layerSettings Map layer settings that are applied to the MapLayerTileTreeReference.\r\n * @param _layerIndex The index of the associated map layer.\r\n * @param iModel The iModel containing the MapLayerTileTreeReference.\r\n * @internal\r\n */\r\n constructor(_layerSettings: MapLayerSettings, _layerIndex: number, iModel: IModelConnection) {\r\n super();\r\n this._layerSettings = _layerSettings;\r\n this._layerIndex = _layerIndex;\r\n this.iModel = iModel;\r\n }\r\n\r\n /* @internal */\r\n protected get _transparency() { return this._layerSettings.transparency ? this._layerSettings.transparency : undefined; }\r\n\r\n /** Returns true if the associated map layer, including its sublayers, is opaque. */\r\n public get isOpaque() {\r\n return this._layerSettings.visible && (!this._layerSettings.allSubLayersInvisible) && !this._layerSettings.transparentBackground && 0 === this._layerSettings.transparency;\r\n }\r\n\r\n /* Returns the map layer name. */\r\n public get layerName() { return this._layerSettings.name; }\r\n\r\n /** Returns the imagery provider for the tile tree. */\r\n public get imageryProvider(): MapLayerImageryProvider | undefined { return undefined; }\r\n\r\n public set layerSettings(layerSettings: MapLayerSettings) { this._layerSettings = layerSettings; }\r\n\r\n /** Returns the layer settings for the map layer. */\r\n public get layerSettings(): MapLayerSettings { return this._layerSettings; }\r\n\r\n /** Returns the index of the map layer associated with the tile tree. */\r\n public get layerIndex(): number { return this._layerIndex; }\r\n\r\n /** Returns the transparency value of the map layer. */\r\n public get transparency() { return this._transparency; }\r\n\r\n public override canSupplyToolTip(hit: HitDetail): boolean {\r\n const tree = this.treeOwner.tileTree;\r\n return undefined !== tree && hit.iModel === tree.iModel && tree.modelId === hit.sourceId;\r\n }\r\n\r\n /* Returns a tooltip describing the hit with the map layer name. */\r\n public override async getToolTip(hit: HitDetail): Promise<HTMLElement | string | undefined> {\r\n const tree = this.treeOwner.tileTree;\r\n if (undefined === tree || hit.iModel !== tree.iModel || tree.modelId !== hit.sourceId)\r\n return undefined;\r\n\r\n const div = document.createElement(\"div\");\r\n div.textContent = `Map Layer: ${this._layerSettings.name}`;\r\n return div;\r\n }\r\n\r\n public override decorate(_context: DecorateContext): void {\r\n this.imageryProvider?.decorate(_context);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a MapLayerTileTreeReference.\r\n * @param layerSettings Model or image map layer settings that are applied to the MapLayerTileTreeReference.\r\n * @param layerIndex The index of the associated map layer.\r\n * @param iModel The iModel containing the new MapLayerTileTreeReference.\r\n * @returns Returns the new tile tree reference, either a ModelMapLayerTileTreeReference or an ImageryMapLayerTreeReference.\r\n * @internal\r\n */\r\nexport function createMapLayerTreeReference(layerSettings: MapLayerSettings, layerIndex: number, iModel: IModelConnection): MapLayerTileTreeReference | undefined {\r\n if (layerSettings instanceof ModelMapLayerSettings) {\r\n return createModelMapLayerTileTreeReference(layerSettings, layerIndex, iModel);\r\n } else if (layerSettings instanceof ImageMapLayerSettings)\r\n return IModelApp.mapLayerFormatRegistry.createImageryMapLayerTree(layerSettings, layerIndex, iModel);\r\n else {\r\n assert (false);\r\n return undefined;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapTileTree.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/MapTileTree.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAoJ,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACnM,OAAO,EACL,qBAAqB,EAAE,iBAAiB,EAAgB,QAAQ,EAAqC,SAAS,EAAE,gBAAgB,EACjI,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACwB,SAAS,EAAE,cAAc,EAAE,OAA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|
857
857
|
let carto;
|
|
858
858
|
const strings = [];
|
|
859
859
|
const getTooltipFunc = async (imageryTreeRef, quadId, cartoGraphic, imageryTree) => {
|
|
860
|
-
|
|
860
|
+
// innerHTML is used below because imageryLoader.getToolTip may deliberately supply markup.
|
|
861
|
+
const layerName = (0, internal_1.escapeHtml)(imageryTreeRef.layerSettings.name);
|
|
862
|
+
strings.push(`${IModelApp_1.IModelApp.localization.getLocalizedString("iModelJs:MapLayers.ImageryLayer")}: ${layerName}`);
|
|
861
863
|
carto = cartoGraphic;
|
|
862
864
|
await imageryTree.imageryLoader.getToolTip(strings, quadId, cartoGraphic, imageryTree);
|
|
863
865
|
};
|