@itwin/map-layers-formats 5.12.0-dev.8 → 5.13.0-dev.1
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/CHANGELOG.md +11 -1
- package/lib/cjs/internal/GoogleMapsUtils.d.ts +1 -1
- package/lib/cjs/internal/GoogleMapsUtils.d.ts.map +1 -1
- package/lib/cjs/internal/GoogleMapsUtils.js.map +1 -1
- package/lib/cjs/mapLayersFormats.d.ts +1 -1
- package/lib/cjs/mapLayersFormats.d.ts.map +1 -1
- package/lib/cjs/mapLayersFormats.js.map +1 -1
- package/lib/esm/internal/GoogleMapsUtils.d.ts +1 -1
- package/lib/esm/internal/GoogleMapsUtils.d.ts.map +1 -1
- package/lib/esm/internal/GoogleMapsUtils.js.map +1 -1
- package/lib/esm/mapLayersFormats.d.ts +1 -1
- package/lib/esm/mapLayersFormats.d.ts.map +1 -1
- package/lib/esm/mapLayersFormats.js.map +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
# Change Log - @itwin/map-layers-formats
|
|
2
2
|
|
|
3
|
-
This log was last generated on Wed,
|
|
3
|
+
This log was last generated on Wed, 15 Jul 2026 19:42:09 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 5.11.3
|
|
6
|
+
Wed, 15 Jul 2026 19:40:44 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 5.11.2
|
|
11
|
+
Fri, 10 Jul 2026 12:20:31 GMT
|
|
12
|
+
|
|
13
|
+
_Version update only_
|
|
4
14
|
|
|
5
15
|
## 5.11.1
|
|
6
16
|
Wed, 08 Jul 2026 19:03:46 GMT
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageMapLayerProps, ImageMapLayerSettings, MapLayerProviderProperties } from "@itwin/core-common";
|
|
2
|
-
import { GoogleMapsCreateSessionOptions } from "../
|
|
2
|
+
import { GoogleMapsCreateSessionOptions } from "../GoogleMaps/GoogleMapsSession.js";
|
|
3
3
|
/** @internal */
|
|
4
4
|
export declare const GoogleMapsUtils: {
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleMapsUtils.d.ts","sourceRoot":"","sources":["../../../src/internal/GoogleMapsUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAG3G,OAAO,EAAE,8BAA8B,EAAoE,MAAM,
|
|
1
|
+
{"version":3,"file":"GoogleMapsUtils.d.ts","sourceRoot":"","sources":["../../../src/internal/GoogleMapsUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAG3G,OAAO,EAAE,8BAA8B,EAAoE,MAAM,oCAAoC,CAAC;AAKtJ,gBAAgB;AAEhB,eAAO,MAAM,eAAe;IAE1B;;;MAGE;;IAOF;;;;;IAKA;iCAC4B,MAAM,SAAwB,8BAA8B,KAAG,kBAAkB;IAW3G;;;;IAIA;+CACyC,8BAA8B,KAAG,0BAA0B;IA0BtG;;;;;MAKE;8CACwC,qBAAqB,KAAG,8BAA8B;CAwCjG,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleMapsUtils.js","sourceRoot":"","sources":["../../../src/internal/GoogleMapsUtils.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAG/F,wDAAiD;AACjD,yFAAoF;AAEpF,sDAA0E;AAE1E,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAErD,gBAAgB;AAChB,gEAAgE;AACnD,QAAA,eAAe,GAAG;IAE7B;;;MAGE;IACF,qBAAqB,EAAE,GAAG,EAAE;QAC1B,IAAI,CAAC,yBAAS,CAAC,sBAAsB,CAAC,YAAY,CAAC,qDAAwB,CAAC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,KAAK,GAAG,UAAU,CAAC,KAA+B,CAAC;QAC1E,CAAC;QAED,IAAI,UAAU,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YACrC,oBAAoB,CAAC,OAAO,GAAG,UAAU,CAAC,OAAkB,CAAC;QAC/D,CAAC;QAED,IAAI,UAAU,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YACxC,oBAAoB,CAAC,UAAU,GAAG,UAAU,CAAC,UAAsB,CAAC;QACtE,CAAC;QACD,OAAO,oBAAoB,CAAC;IAC9B,CAAC;CACF,CAAA","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { ImageMapLayerProps, ImageMapLayerSettings, MapLayerProviderProperties } from \"@itwin/core-common\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { GoogleMapsMapLayerFormat } from \"../GoogleMaps/GoogleMapsImageryFormat.js\";\nimport { GoogleMapsCreateSessionOptions, GoogleMapsLayerTypes, GoogleMapsMapTypes, GoogleMapsScaleFactors } from \"../
|
|
1
|
+
{"version":3,"file":"GoogleMapsUtils.js","sourceRoot":"","sources":["../../../src/internal/GoogleMapsUtils.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAG/F,wDAAiD;AACjD,yFAAoF;AAEpF,sDAA0E;AAE1E,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAErD,gBAAgB;AAChB,gEAAgE;AACnD,QAAA,eAAe,GAAG;IAE7B;;;MAGE;IACF,qBAAqB,EAAE,GAAG,EAAE;QAC1B,IAAI,CAAC,yBAAS,CAAC,sBAAsB,CAAC,YAAY,CAAC,qDAAwB,CAAC,QAAQ,CAAC,EAAE,CAAC;YACtF,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;IAED;;;;;IAKA;IACA,mBAAmB,EAAE,CAAC,OAAe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AC,OAAkB,CAAC;QAC/D,CAAC;QAED,IAAI,UAAU,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YACxC,oBAAoB,CAAC,UAAU,GAAG,UAAU,CAAC,UAAsB,CAAC;QACtE,CAAC;QACD,OAAO,oBAAoB,CAAC;IAC9B,CAAC;CACF,CAAA","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { ImageMapLayerProps, ImageMapLayerSettings, MapLayerProviderProperties } from \"@itwin/core-common\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { GoogleMapsMapLayerFormat } from \"../GoogleMaps/GoogleMapsImageryFormat.js\";\nimport { GoogleMapsCreateSessionOptions, GoogleMapsLayerTypes, GoogleMapsMapTypes, GoogleMapsScaleFactors } from \"../GoogleMaps/GoogleMapsSession.js\";\nimport { BentleyError, BentleyStatus, Logger } from \"@itwin/core-bentley\";\n\nconst loggerCategory = \"MapLayersFormats.GoogleMaps\";\n\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const GoogleMapsUtils = {\n\n /**\n * Register the google maps format if it is not already registered.\n * @internal\n */\n checkFormatRegistered: () => {\n if (!IModelApp.mapLayerFormatRegistry.isRegistered(GoogleMapsMapLayerFormat.formatId)) {\n throw new Error(`GoogleMaps format is not registered`);\n }\n },\n\n /**\n * Creates a Google Maps layer props.\n * @param name Name of the layer (Defaults to \"GoogleMaps\")\n * @param opts Options to create the session (Defaults to satellite map type, English language, US region, and roadmap layer type)\n * @internal\n*/\n createMapLayerProps: (name: string = \"GoogleMaps\", opts?: GoogleMapsCreateSessionOptions): ImageMapLayerProps => {\n GoogleMapsUtils.checkFormatRegistered();\n\n return {\n formatId: GoogleMapsMapLayerFormat.formatId,\n url: \"\",\n name,\n properties: GoogleMapsUtils.createPropertiesFromSessionOptions(opts ?? {mapType: \"satellite\", language: \"en-US\", region: \"US:\", layerTypes: [\"layerRoadmap\"]}),\n };\n },\n\n /**\n * Converts the session options to provider properties\n * @param opts Options to create the session\n * @internal\n */\n createPropertiesFromSessionOptions: (opts: GoogleMapsCreateSessionOptions): MapLayerProviderProperties => {\n const properties: MapLayerProviderProperties = {\n mapType: opts.mapType,\n language: opts.language,\n region: opts.region,\n }\n\n if (opts.layerTypes !== undefined) {\n properties.layerTypes = [...opts.layerTypes];\n }\n\n if (opts.scale !== undefined) {\n properties.scale = opts.scale;\n }\n\n if (opts.overlay !== undefined) {\n properties.overlay = opts.overlay;\n }\n\n if (opts.apiOptions !== undefined) {\n properties.apiOptions = [...opts.apiOptions];\n }\n\n return properties;\n },\n\n /**\n * Read the session options from the map layer settings.\n * @param settings Map layer settings\n * ```\n * @internal\n */\n getSessionOptionsFromMapLayer: (settings: ImageMapLayerSettings): GoogleMapsCreateSessionOptions => {\n const properties = settings.properties;\n if (properties === undefined) {\n const msg = \"Missing session options\";\n Logger.logError(loggerCategory, msg);\n throw new BentleyError(BentleyStatus.ERROR, msg);\n }\n\n const layerPropertyKeys = Object.keys(properties);\n if (!layerPropertyKeys.includes(\"mapType\") ||\n !layerPropertyKeys.includes(\"language\") ||\n !layerPropertyKeys.includes(\"region\")) {\n const msg = \"Missing session options\";\n Logger.logError(loggerCategory, msg);\n throw new BentleyError(BentleyStatus.ERROR, msg);\n }\n\n const createSessionOptions: GoogleMapsCreateSessionOptions = {\n mapType: properties.mapType as GoogleMapsMapTypes,\n region: properties.region as string,\n language: properties.language as string,\n };\n\n if (Array.isArray(properties.layerTypes) && properties.layerTypes.length > 0) {\n createSessionOptions.layerTypes = properties.layerTypes as GoogleMapsLayerTypes[];\n }\n\n if (properties.scale !== undefined) {\n createSessionOptions.scale = properties.scale as GoogleMapsScaleFactors;\n }\n\n if (properties.overlay !== undefined) {\n createSessionOptions.overlay = properties.overlay as boolean;\n }\n\n if (properties.apiOptions !== undefined) {\n createSessionOptions.apiOptions = properties.apiOptions as string[];\n }\n return createSessionOptions;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapLayersFormats.d.ts","sourceRoot":"","sources":["../../src/mapLayersFormats.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAOlD,OAAO,EAAE,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"mapLayersFormats.d.ts","sourceRoot":"","sources":["../../src/mapLayersFormats.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAOlD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAE7E;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,0BAA0B;IAC1B,aAAa,CAAC,EAAE,gBAAgB,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,cAAc,CAAC,EAAE,wBAAwB,CAAA;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wFAAwF;IACxF,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,qBAAa,gBAAgB;IAE3B,OAAO,CAAC,MAAM,CAAC,UAAU,CAAsB;IAC/C,OAAc,YAAY,EAAE,YAAY,CAAC;IAEzC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAoB;IACnD,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAmB;IAEjD;;;OAGG;WACiB,UAAU,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoB9E,kDAAkD;IAClD,WAAkB,qBAAqB,IAAI,MAAM,CAEhD;IAED,WAAkB,cAAc,kCAE/B;IAED,yDAAyD;IACzD,WAAkB,aAAa,iCAE9B;CAEF"}
|
|
@@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,CAAC;IAC1D,CAAC;IAED,kDAAkD;IAC3C,MAAM,KAAK,qBAAqB;QACrC,OAAO,gBAAgB,CAAC,UAAU,CAAC;IACrC,CAAC;IAEM,MAAM,KAAK,cAAc;QAC9B,OAAO,gBAAgB,CAAC,eAAe,CAAC;IAC1C,CAAC;IAED,yDAAyD;IAClD,MAAM,KAAK,aAAa;QAC7B,OAAO,gBAAgB,CAAC,cAAc,CAAC;IACzC,CAAC;;AA5CH,4CA8CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module MapLayersFormats\n */\nimport { assert } from \"@itwin/core-bentley\";\nimport { Localization } from \"@itwin/core-common\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { ArcGisFeatureMapLayerFormat } from \"./ArcGisFeature/ArcGisFeatureFormat.js\";\nimport { AzureMapsMapLayerFormat } from \"./AzureMaps/AzureMapsImageryFormat.js\";\nimport { GoogleMapsMapLayerFormat } from \"./GoogleMaps/GoogleMapsImageryFormat.js\";\nimport { OgcApiFeaturesMapLayerFormat } from \"./OgcApiFeatures/OgcApiFeaturesFormat.js\";\nimport { MapFeatureInfoTool } from \"./Tools/MapFeatureInfoTool.js\";\nimport { GoogleMapsSessionManager } from \"./
|
|
1
|
+
{"version":3,"file":"mapLayersFormats.js","sourceRoot":"","sources":["../../src/mapLayersFormats.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AACH,sDAA6C;AAE7C,wDAAiD;AACjD,mFAAqF;AACrF,qFAAgF;AAChF,wFAAmF;AACnF,sFAAwF;AACxF,yEAAmE;AA4BnE;;GAEG;AACH,MAAa,gBAAgB;IAEnB,MAAM,CAAC,UAAU,GAAG,kBAAkB,CAAC;IACxC,MAAM,CAAC,YAAY,CAAe;IAEjC,MAAM,CAAC,eAAe,CAAqB;IAC3C,MAAM,CAAC,cAAc,CAAoB;IAEjD;;;OAGG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAA+B;QAC5D,IAAA,qBAAM,EAAC,yBAAS,CAAC,WAAW,EAAE,kGAAkG,CAAC,CAAC;QAClI,IAAI,yBAAS,CAAC,WAAW,EAAE,CAAC;YAC1B,yBAAS,CAAC,sBAAsB,CAAC,QAAQ,CAAC,oDAA2B,CAAC,CAAC;YACvE,yBAAS,CAAC,sBAAsB,CAAC,QAAQ,CAAC,sDAA4B,CAAC,CAAC;YACxE,yBAAS,CAAC,sBAAsB,CAAC,QAAQ,CAAC,qDAAwB,CAAC,CAAC;YACpE,yBAAS,CAAC,sBAAsB,CAAC,QAAQ,CAAC,mDAAuB,CAAC,CAAC;QACrE,CAAC;QAED,mEAAmE;QACnE,gBAAgB,CAAC,YAAY,GAAG,MAAM,EAAE,YAAY,IAAI,yBAAS,CAAC,YAAY,CAAC;QAC/E,MAAM,gBAAgB,CAAC,YAAY,CAAC,iBAAiB,CACnD,gBAAgB,CAAC,qBAAqB,CACvC,CAAC;QAEF,0CAAkB,CAAC,QAAQ,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;QACpE,gBAAgB,CAAC,eAAe,GAAG,MAAM,EAAE,cAAc,CAAC;QAC1D,gBAAgB,CAAC,cAAc,GAAG,MAAM,EAAE,aAAa,CAAC;IAC1D,CAAC;IAED,kDAAkD;IAC3C,MAAM,KAAK,qBAAqB;QACrC,OAAO,gBAAgB,CAAC,UAAU,CAAC;IACrC,CAAC;IAEM,MAAM,KAAK,cAAc;QAC9B,OAAO,gBAAgB,CAAC,eAAe,CAAC;IAC1C,CAAC;IAED,yDAAyD;IAClD,MAAM,KAAK,aAAa;QAC7B,OAAO,gBAAgB,CAAC,cAAc,CAAC;IACzC,CAAC;;AA5CH,4CA8CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module MapLayersFormats\n */\nimport { assert } from \"@itwin/core-bentley\";\nimport { Localization } from \"@itwin/core-common\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { ArcGisFeatureMapLayerFormat } from \"./ArcGisFeature/ArcGisFeatureFormat.js\";\nimport { AzureMapsMapLayerFormat } from \"./AzureMaps/AzureMapsImageryFormat.js\";\nimport { GoogleMapsMapLayerFormat } from \"./GoogleMaps/GoogleMapsImageryFormat.js\";\nimport { OgcApiFeaturesMapLayerFormat } from \"./OgcApiFeatures/OgcApiFeaturesFormat.js\";\nimport { MapFeatureInfoTool } from \"./Tools/MapFeatureInfoTool.js\";\nimport { GoogleMapsSessionManager } from \"./GoogleMaps/GoogleMapsSession.js\";\n\n/** Configuration options.\n * @beta\n */\nexport interface MapLayersFormatsConfig {\n localization?: Localization;\n googleMapsOpts?: GoogleMapsOptions;\n /** Azure Maps options. */\n azureMapsOpts?: AzureMapsOptions;\n}\n\n/** Google Maps options.\n * @beta\n */\nexport interface GoogleMapsOptions {\n sessionManager?: GoogleMapsSessionManager\n}\n\n/** Azure Maps options.\n * @beta\n */\nexport interface AzureMapsOptions {\n /** Azure Maps subscription key used when a layer does not supply its own access key. */\n subscriptionKey?: string;\n}\n\n/** The primary API for the `@itwin/map-layers-formats` package. It allows the package's features to be [[initialize]]d.\n * @beta\n */\nexport class MapLayersFormats {\n\n private static _defaultNs = \"mapLayersFormats\";\n public static localization: Localization;\n\n private static _googleMapsOpts?: GoogleMapsOptions;\n private static _azureMapsOpts?: AzureMapsOptions;\n\n /** Registers the [MapLayerFormat]($frontend)s provided by this package for use with [IModelApp]($frontend).\n * Typically, an application will call `MapLayersFormats.initialize` immediately after [IModelApp.startup]($frontend).\n * This function has no effect if called **before** [IModelApp.startup]($frontend) or **after** [IModelApp.shutdown]($frontend).\n */\n public static async initialize(config?: MapLayersFormatsConfig): Promise<void> {\n assert(IModelApp.initialized, \"MapLayersFormats.initialize must be called after IModelApp.startup and before IModelApp.shutdown\");\n if (IModelApp.initialized) {\n IModelApp.mapLayerFormatRegistry.register(ArcGisFeatureMapLayerFormat);\n IModelApp.mapLayerFormatRegistry.register(OgcApiFeaturesMapLayerFormat);\n IModelApp.mapLayerFormatRegistry.register(GoogleMapsMapLayerFormat);\n IModelApp.mapLayerFormatRegistry.register(AzureMapsMapLayerFormat);\n }\n\n // register namespace containing localized strings for this package\n MapLayersFormats.localization = config?.localization ?? IModelApp.localization;\n await MapLayersFormats.localization.registerNamespace(\n MapLayersFormats.localizationNamespace,\n );\n\n MapFeatureInfoTool.register(MapLayersFormats.localizationNamespace);\n MapLayersFormats._googleMapsOpts = config?.googleMapsOpts;\n MapLayersFormats._azureMapsOpts = config?.azureMapsOpts;\n }\n\n /** The internationalization service namespace. */\n public static get localizationNamespace(): string {\n return MapLayersFormats._defaultNs;\n }\n\n public static get googleMapsOpts() {\n return MapLayersFormats._googleMapsOpts;\n }\n\n /** Azure Maps options supplied during initialization. */\n public static get azureMapsOpts() {\n return MapLayersFormats._azureMapsOpts;\n }\n\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageMapLayerProps, ImageMapLayerSettings, MapLayerProviderProperties } from "@itwin/core-common";
|
|
2
|
-
import { GoogleMapsCreateSessionOptions } from "../
|
|
2
|
+
import { GoogleMapsCreateSessionOptions } from "../GoogleMaps/GoogleMapsSession.js";
|
|
3
3
|
/** @internal */
|
|
4
4
|
export declare const GoogleMapsUtils: {
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleMapsUtils.d.ts","sourceRoot":"","sources":["../../../src/internal/GoogleMapsUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAG3G,OAAO,EAAE,8BAA8B,EAAoE,MAAM,
|
|
1
|
+
{"version":3,"file":"GoogleMapsUtils.d.ts","sourceRoot":"","sources":["../../../src/internal/GoogleMapsUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAG3G,OAAO,EAAE,8BAA8B,EAAoE,MAAM,oCAAoC,CAAC;AAKtJ,gBAAgB;AAEhB,eAAO,MAAM,eAAe;IAE1B;;;MAGE;;IAOF;;;;;IAKA;iCAC4B,MAAM,SAAwB,8BAA8B,KAAG,kBAAkB;IAW3G;;;;IAIA;+CACyC,8BAA8B,KAAG,0BAA0B;IA0BtG;;;;;MAKE;8CACwC,qBAAqB,KAAG,8BAA8B;CAwCjG,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleMapsUtils.js","sourceRoot":"","sources":["../../../src/internal/GoogleMapsUtils.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAG/F,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAEpF,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE1E,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAErD,gBAAgB;AAChB,gEAAgE;AAChE,MAAM,CAAC,MAAM,eAAe,GAAG;IAE7B;;;MAGE;IACF,qBAAqB,EAAE,GAAG,EAAE;QAC1B,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,YAAY,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE,CAAC;YACtF,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;IAED;;;;;IAKA;IACA,mBAAmB,EAAE,CAAC,OAAe,YAAY,EAAE,IAAqC,EAAsB,EAAE;QAC9G,eAAe,CAAC,qBAAqB,EAAE,CAAC;QAExC,OAAO;YACL,QAA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UAAU,GAAG,UAAU,CAAC,UAAsB,CAAC;QACtE,CAAC;QACD,OAAO,oBAAoB,CAAC;IAC9B,CAAC;CACF,CAAA","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { ImageMapLayerProps, ImageMapLayerSettings, MapLayerProviderProperties } from \"@itwin/core-common\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { GoogleMapsMapLayerFormat } from \"../GoogleMaps/GoogleMapsImageryFormat.js\";\nimport { GoogleMapsCreateSessionOptions, GoogleMapsLayerTypes, GoogleMapsMapTypes, GoogleMapsScaleFactors } from \"../
|
|
1
|
+
{"version":3,"file":"GoogleMapsUtils.js","sourceRoot":"","sources":["../../../src/internal/GoogleMapsUtils.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAG/F,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAEpF,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE1E,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAErD,gBAAgB;AAChB,gEAAgE;AAChE,MAAM,CAAC,MAAM,eAAe,GAAG;IAE7B;;;MAGE;IACF,qBAAqB,EAAE,GAAG,EAAE;QAC1B,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,YAAY,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE,CAAC;YACtF,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;IAED;;;;;IAKA;IACA,mBAAmB,EAAE,CAAC,OAAe,YAAY,EAAE,IAAqC,EAAsB,EAAE;QAC9G,eAAe,CAAC,qBAAqB,EAAE,CAAC;QAExC,OAAO;YACL,QAAQ,EAAE,wB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UAAU,CAAC,UAAsB,CAAC;QACtE,CAAC;QACD,OAAO,oBAAoB,CAAC;IAC9B,CAAC;CACF,CAAA","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { ImageMapLayerProps, ImageMapLayerSettings, MapLayerProviderProperties } from \"@itwin/core-common\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { GoogleMapsMapLayerFormat } from \"../GoogleMaps/GoogleMapsImageryFormat.js\";\nimport { GoogleMapsCreateSessionOptions, GoogleMapsLayerTypes, GoogleMapsMapTypes, GoogleMapsScaleFactors } from \"../GoogleMaps/GoogleMapsSession.js\";\nimport { BentleyError, BentleyStatus, Logger } from \"@itwin/core-bentley\";\n\nconst loggerCategory = \"MapLayersFormats.GoogleMaps\";\n\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const GoogleMapsUtils = {\n\n /**\n * Register the google maps format if it is not already registered.\n * @internal\n */\n checkFormatRegistered: () => {\n if (!IModelApp.mapLayerFormatRegistry.isRegistered(GoogleMapsMapLayerFormat.formatId)) {\n throw new Error(`GoogleMaps format is not registered`);\n }\n },\n\n /**\n * Creates a Google Maps layer props.\n * @param name Name of the layer (Defaults to \"GoogleMaps\")\n * @param opts Options to create the session (Defaults to satellite map type, English language, US region, and roadmap layer type)\n * @internal\n*/\n createMapLayerProps: (name: string = \"GoogleMaps\", opts?: GoogleMapsCreateSessionOptions): ImageMapLayerProps => {\n GoogleMapsUtils.checkFormatRegistered();\n\n return {\n formatId: GoogleMapsMapLayerFormat.formatId,\n url: \"\",\n name,\n properties: GoogleMapsUtils.createPropertiesFromSessionOptions(opts ?? {mapType: \"satellite\", language: \"en-US\", region: \"US:\", layerTypes: [\"layerRoadmap\"]}),\n };\n },\n\n /**\n * Converts the session options to provider properties\n * @param opts Options to create the session\n * @internal\n */\n createPropertiesFromSessionOptions: (opts: GoogleMapsCreateSessionOptions): MapLayerProviderProperties => {\n const properties: MapLayerProviderProperties = {\n mapType: opts.mapType,\n language: opts.language,\n region: opts.region,\n }\n\n if (opts.layerTypes !== undefined) {\n properties.layerTypes = [...opts.layerTypes];\n }\n\n if (opts.scale !== undefined) {\n properties.scale = opts.scale;\n }\n\n if (opts.overlay !== undefined) {\n properties.overlay = opts.overlay;\n }\n\n if (opts.apiOptions !== undefined) {\n properties.apiOptions = [...opts.apiOptions];\n }\n\n return properties;\n },\n\n /**\n * Read the session options from the map layer settings.\n * @param settings Map layer settings\n * ```\n * @internal\n */\n getSessionOptionsFromMapLayer: (settings: ImageMapLayerSettings): GoogleMapsCreateSessionOptions => {\n const properties = settings.properties;\n if (properties === undefined) {\n const msg = \"Missing session options\";\n Logger.logError(loggerCategory, msg);\n throw new BentleyError(BentleyStatus.ERROR, msg);\n }\n\n const layerPropertyKeys = Object.keys(properties);\n if (!layerPropertyKeys.includes(\"mapType\") ||\n !layerPropertyKeys.includes(\"language\") ||\n !layerPropertyKeys.includes(\"region\")) {\n const msg = \"Missing session options\";\n Logger.logError(loggerCategory, msg);\n throw new BentleyError(BentleyStatus.ERROR, msg);\n }\n\n const createSessionOptions: GoogleMapsCreateSessionOptions = {\n mapType: properties.mapType as GoogleMapsMapTypes,\n region: properties.region as string,\n language: properties.language as string,\n };\n\n if (Array.isArray(properties.layerTypes) && properties.layerTypes.length > 0) {\n createSessionOptions.layerTypes = properties.layerTypes as GoogleMapsLayerTypes[];\n }\n\n if (properties.scale !== undefined) {\n createSessionOptions.scale = properties.scale as GoogleMapsScaleFactors;\n }\n\n if (properties.overlay !== undefined) {\n createSessionOptions.overlay = properties.overlay as boolean;\n }\n\n if (properties.apiOptions !== undefined) {\n createSessionOptions.apiOptions = properties.apiOptions as string[];\n }\n return createSessionOptions;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapLayersFormats.d.ts","sourceRoot":"","sources":["../../src/mapLayersFormats.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAOlD,OAAO,EAAE,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"mapLayersFormats.d.ts","sourceRoot":"","sources":["../../src/mapLayersFormats.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAOlD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAE7E;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,0BAA0B;IAC1B,aAAa,CAAC,EAAE,gBAAgB,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,cAAc,CAAC,EAAE,wBAAwB,CAAA;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wFAAwF;IACxF,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,qBAAa,gBAAgB;IAE3B,OAAO,CAAC,MAAM,CAAC,UAAU,CAAsB;IAC/C,OAAc,YAAY,EAAE,YAAY,CAAC;IAEzC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAoB;IACnD,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAmB;IAEjD;;;OAGG;WACiB,UAAU,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoB9E,kDAAkD;IAClD,WAAkB,qBAAqB,IAAI,MAAM,CAEhD;IAED,WAAkB,cAAc,kCAE/B;IAED,yDAAyD;IACzD,WAAkB,aAAa,iCAE9B;CAEF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapLayersFormats.js","sourceRoot":"","sources":["../../src/mapLayersFormats.ts"],"names":[],"mappings":"AAAA;;;+FAG+F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gB,CAAC,qBAAqB,CAAC,CAAC;QACpE,gBAAgB,CAAC,eAAe,GAAG,MAAM,EAAE,cAAc,CAAC;QAC1D,gBAAgB,CAAC,cAAc,GAAG,MAAM,EAAE,aAAa,CAAC;IAC1D,CAAC;IAED,kDAAkD;IAC3C,MAAM,KAAK,qBAAqB;QACrC,OAAO,gBAAgB,CAAC,UAAU,CAAC;IACrC,CAAC;IAEM,MAAM,KAAK,cAAc;QAC9B,OAAO,gBAAgB,CAAC,eAAe,CAAC;IAC1C,CAAC;IAED,yDAAyD;IAClD,MAAM,KAAK,aAAa;QAC7B,OAAO,gBAAgB,CAAC,cAAc,CAAC;IACzC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module MapLayersFormats\n */\nimport { assert } from \"@itwin/core-bentley\";\nimport { Localization } from \"@itwin/core-common\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { ArcGisFeatureMapLayerFormat } from \"./ArcGisFeature/ArcGisFeatureFormat.js\";\nimport { AzureMapsMapLayerFormat } from \"./AzureMaps/AzureMapsImageryFormat.js\";\nimport { GoogleMapsMapLayerFormat } from \"./GoogleMaps/GoogleMapsImageryFormat.js\";\nimport { OgcApiFeaturesMapLayerFormat } from \"./OgcApiFeatures/OgcApiFeaturesFormat.js\";\nimport { MapFeatureInfoTool } from \"./Tools/MapFeatureInfoTool.js\";\nimport { GoogleMapsSessionManager } from \"./
|
|
1
|
+
{"version":3,"file":"mapLayersFormats.js","sourceRoot":"","sources":["../../src/mapLayersFormats.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,2BAA2B,EA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AC1D,CAAC;IAED,kDAAkD;IAC3C,MAAM,KAAK,qBAAqB;QACrC,OAAO,gBAAgB,CAAC,UAAU,CAAC;IACrC,CAAC;IAEM,MAAM,KAAK,cAAc;QAC9B,OAAO,gBAAgB,CAAC,eAAe,CAAC;IAC1C,CAAC;IAED,yDAAyD;IAClD,MAAM,KAAK,aAAa;QAC7B,OAAO,gBAAgB,CAAC,cAAc,CAAC;IACzC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module MapLayersFormats\n */\nimport { assert } from \"@itwin/core-bentley\";\nimport { Localization } from \"@itwin/core-common\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { ArcGisFeatureMapLayerFormat } from \"./ArcGisFeature/ArcGisFeatureFormat.js\";\nimport { AzureMapsMapLayerFormat } from \"./AzureMaps/AzureMapsImageryFormat.js\";\nimport { GoogleMapsMapLayerFormat } from \"./GoogleMaps/GoogleMapsImageryFormat.js\";\nimport { OgcApiFeaturesMapLayerFormat } from \"./OgcApiFeatures/OgcApiFeaturesFormat.js\";\nimport { MapFeatureInfoTool } from \"./Tools/MapFeatureInfoTool.js\";\nimport { GoogleMapsSessionManager } from \"./GoogleMaps/GoogleMapsSession.js\";\n\n/** Configuration options.\n * @beta\n */\nexport interface MapLayersFormatsConfig {\n localization?: Localization;\n googleMapsOpts?: GoogleMapsOptions;\n /** Azure Maps options. */\n azureMapsOpts?: AzureMapsOptions;\n}\n\n/** Google Maps options.\n * @beta\n */\nexport interface GoogleMapsOptions {\n sessionManager?: GoogleMapsSessionManager\n}\n\n/** Azure Maps options.\n * @beta\n */\nexport interface AzureMapsOptions {\n /** Azure Maps subscription key used when a layer does not supply its own access key. */\n subscriptionKey?: string;\n}\n\n/** The primary API for the `@itwin/map-layers-formats` package. It allows the package's features to be [[initialize]]d.\n * @beta\n */\nexport class MapLayersFormats {\n\n private static _defaultNs = \"mapLayersFormats\";\n public static localization: Localization;\n\n private static _googleMapsOpts?: GoogleMapsOptions;\n private static _azureMapsOpts?: AzureMapsOptions;\n\n /** Registers the [MapLayerFormat]($frontend)s provided by this package for use with [IModelApp]($frontend).\n * Typically, an application will call `MapLayersFormats.initialize` immediately after [IModelApp.startup]($frontend).\n * This function has no effect if called **before** [IModelApp.startup]($frontend) or **after** [IModelApp.shutdown]($frontend).\n */\n public static async initialize(config?: MapLayersFormatsConfig): Promise<void> {\n assert(IModelApp.initialized, \"MapLayersFormats.initialize must be called after IModelApp.startup and before IModelApp.shutdown\");\n if (IModelApp.initialized) {\n IModelApp.mapLayerFormatRegistry.register(ArcGisFeatureMapLayerFormat);\n IModelApp.mapLayerFormatRegistry.register(OgcApiFeaturesMapLayerFormat);\n IModelApp.mapLayerFormatRegistry.register(GoogleMapsMapLayerFormat);\n IModelApp.mapLayerFormatRegistry.register(AzureMapsMapLayerFormat);\n }\n\n // register namespace containing localized strings for this package\n MapLayersFormats.localization = config?.localization ?? IModelApp.localization;\n await MapLayersFormats.localization.registerNamespace(\n MapLayersFormats.localizationNamespace,\n );\n\n MapFeatureInfoTool.register(MapLayersFormats.localizationNamespace);\n MapLayersFormats._googleMapsOpts = config?.googleMapsOpts;\n MapLayersFormats._azureMapsOpts = config?.azureMapsOpts;\n }\n\n /** The internationalization service namespace. */\n public static get localizationNamespace(): string {\n return MapLayersFormats._defaultNs;\n }\n\n public static get googleMapsOpts() {\n return MapLayersFormats._googleMapsOpts;\n }\n\n /** Azure Maps options supplied during initialization. */\n public static get azureMapsOpts() {\n return MapLayersFormats._azureMapsOpts;\n }\n\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/map-layers-formats",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.13.0-dev.1",
|
|
4
4
|
"description": "Enables additional map-layers formats in iTwin.js",
|
|
5
5
|
"main": "lib/cjs/map-layers-formats.js",
|
|
6
6
|
"module": "lib/esm/map-layers-formats.js",
|
|
@@ -52,20 +52,20 @@
|
|
|
52
52
|
"source-map-support": "^0.5.6",
|
|
53
53
|
"typescript": "~5.6.2",
|
|
54
54
|
"fetch-mock": "~11.1.3",
|
|
55
|
-
"@itwin/
|
|
56
|
-
"@itwin/core-bentley": "5.
|
|
57
|
-
"@itwin/
|
|
55
|
+
"@itwin/build-tools": "5.13.0-dev.1",
|
|
56
|
+
"@itwin/core-bentley": "5.13.0-dev.1",
|
|
57
|
+
"@itwin/appui-abstract": "5.13.0-dev.1",
|
|
58
58
|
"internal-tools": "3.0.0-dev.69",
|
|
59
|
-
"@itwin/
|
|
60
|
-
"@itwin/core-
|
|
61
|
-
"@itwin/core-
|
|
59
|
+
"@itwin/core-common": "5.13.0-dev.1",
|
|
60
|
+
"@itwin/core-frontend": "5.13.0-dev.1",
|
|
61
|
+
"@itwin/core-geometry": "5.13.0-dev.1"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@itwin/
|
|
65
|
-
"@itwin/core-
|
|
66
|
-
"@itwin/
|
|
67
|
-
"@itwin/core-
|
|
68
|
-
"@itwin/core-
|
|
64
|
+
"@itwin/core-bentley": "5.13.0-dev.1",
|
|
65
|
+
"@itwin/core-frontend": "5.13.0-dev.1",
|
|
66
|
+
"@itwin/appui-abstract": "5.13.0-dev.1",
|
|
67
|
+
"@itwin/core-common": "5.13.0-dev.1",
|
|
68
|
+
"@itwin/core-geometry": "5.13.0-dev.1"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"google-protobuf": "~3.20.1",
|