@itwin/map-layers-formats 5.1.0-dev.9 → 5.1.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.
- package/CHANGELOG.md +75 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
- package/lib/cjs/ArcGisFeature/EsriSymbology.js.map +1 -1
- package/lib/cjs/ArcGisFeature/esriPBuffer.gen.js.map +1 -1
- package/lib/cjs/Feature/DefaultMarkerIcon.js +9 -9
- package/lib/cjs/Feature/DefaultMarkerIcon.js.map +1 -1
- package/lib/cjs/Feature/FeatureCanvasRenderer.js.map +1 -1
- package/lib/cjs/Feature/FeatureInfoReader.js.map +1 -1
- package/lib/cjs/Feature/FeatureSymbology.js.map +1 -1
- package/lib/cjs/Feature/RandomMapColor.js.map +1 -1
- package/lib/cjs/GeoJSON/GeoJSONGeometry.js.map +1 -1
- package/lib/cjs/GeoJSON/GeoJSONGeometryReader.js.map +1 -1
- package/lib/cjs/GoogleMaps/GoogleMaps.d.ts +8 -125
- package/lib/cjs/GoogleMaps/GoogleMaps.d.ts.map +1 -1
- package/lib/cjs/GoogleMaps/GoogleMaps.js +10 -3
- package/lib/cjs/GoogleMaps/GoogleMaps.js.map +1 -1
- package/lib/cjs/GoogleMaps/GoogleMapsImageryFormat.d.ts +8 -0
- package/lib/cjs/GoogleMaps/GoogleMapsImageryFormat.d.ts.map +1 -1
- package/lib/cjs/GoogleMaps/GoogleMapsImageryFormat.js +10 -1
- package/lib/cjs/GoogleMaps/GoogleMapsImageryFormat.js.map +1 -1
- package/lib/cjs/GoogleMaps/GoogleMapsImageryProvider.d.ts +10 -7
- package/lib/cjs/GoogleMaps/GoogleMapsImageryProvider.d.ts.map +1 -1
- package/lib/cjs/GoogleMaps/GoogleMapsImageryProvider.js +65 -68
- package/lib/cjs/GoogleMaps/GoogleMapsImageryProvider.js.map +1 -1
- package/lib/cjs/GoogleMaps/GoogleMapsSession.d.ts +152 -0
- package/lib/cjs/GoogleMaps/GoogleMapsSession.d.ts.map +1 -0
- package/lib/cjs/GoogleMaps/GoogleMapsSession.js +33 -0
- package/lib/cjs/GoogleMaps/GoogleMapsSession.js.map +1 -0
- package/lib/cjs/Icons/MapInfoIcon.js.map +1 -1
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesFormat.js.map +1 -1
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesProvider.js.map +1 -1
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesReader.js.map +1 -1
- package/lib/cjs/Tools/GeometryTerrainDraper.js.map +1 -1
- package/lib/cjs/Tools/MapFeatureInfoDecorator.js.map +1 -1
- package/lib/cjs/Tools/MapFeatureInfoTool.js.map +1 -1
- package/lib/cjs/internal/GoogleMapsUtils.d.ts +9 -16
- package/lib/cjs/internal/GoogleMapsUtils.d.ts.map +1 -1
- package/lib/cjs/internal/GoogleMapsUtils.js +36 -40
- package/lib/cjs/internal/GoogleMapsUtils.js.map +1 -1
- package/lib/cjs/internal/NativeGoogleMapsSession.d.ts +29 -0
- package/lib/cjs/internal/NativeGoogleMapsSession.d.ts.map +1 -0
- package/lib/cjs/internal/NativeGoogleMapsSession.js +83 -0
- package/lib/cjs/internal/NativeGoogleMapsSession.js.map +1 -0
- package/lib/cjs/map-layers-formats.d.ts +2 -0
- package/lib/cjs/map-layers-formats.d.ts.map +1 -1
- package/lib/cjs/map-layers-formats.js +2 -0
- package/lib/cjs/map-layers-formats.js.map +1 -1
- package/lib/cjs/mapLayersFormats.d.ts +10 -0
- package/lib/cjs/mapLayersFormats.d.ts.map +1 -1
- package/lib/cjs/mapLayersFormats.js +5 -0
- package/lib/cjs/mapLayersFormats.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
- package/lib/esm/ArcGisFeature/EsriSymbology.js.map +1 -1
- package/lib/esm/ArcGisFeature/esriPBuffer.gen.js.map +1 -1
- package/lib/esm/Feature/DefaultMarkerIcon.js +9 -9
- package/lib/esm/Feature/DefaultMarkerIcon.js.map +1 -1
- package/lib/esm/Feature/FeatureCanvasRenderer.js.map +1 -1
- package/lib/esm/Feature/FeatureInfoReader.js.map +1 -1
- package/lib/esm/Feature/FeatureSymbology.js.map +1 -1
- package/lib/esm/Feature/RandomMapColor.js.map +1 -1
- package/lib/esm/GeoJSON/GeoJSONGeometry.js.map +1 -1
- package/lib/esm/GeoJSON/GeoJSONGeometryReader.js.map +1 -1
- package/lib/esm/GoogleMaps/GoogleMaps.d.ts +8 -125
- package/lib/esm/GoogleMaps/GoogleMaps.d.ts.map +1 -1
- package/lib/esm/GoogleMaps/GoogleMaps.js +10 -3
- package/lib/esm/GoogleMaps/GoogleMaps.js.map +1 -1
- package/lib/esm/GoogleMaps/GoogleMapsImageryFormat.d.ts +8 -0
- package/lib/esm/GoogleMaps/GoogleMapsImageryFormat.d.ts.map +1 -1
- package/lib/esm/GoogleMaps/GoogleMapsImageryFormat.js +10 -1
- package/lib/esm/GoogleMaps/GoogleMapsImageryFormat.js.map +1 -1
- package/lib/esm/GoogleMaps/GoogleMapsImageryProvider.d.ts +10 -7
- package/lib/esm/GoogleMaps/GoogleMapsImageryProvider.d.ts.map +1 -1
- package/lib/esm/GoogleMaps/GoogleMapsImageryProvider.js +65 -68
- package/lib/esm/GoogleMaps/GoogleMapsImageryProvider.js.map +1 -1
- package/lib/esm/GoogleMaps/GoogleMapsSession.d.ts +152 -0
- package/lib/esm/GoogleMaps/GoogleMapsSession.d.ts.map +1 -0
- package/lib/esm/GoogleMaps/GoogleMapsSession.js +28 -0
- package/lib/esm/GoogleMaps/GoogleMapsSession.js.map +1 -0
- package/lib/esm/Icons/MapInfoIcon.js.map +1 -1
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesFormat.js.map +1 -1
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesProvider.js.map +1 -1
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesReader.js.map +1 -1
- package/lib/esm/Tools/GeometryTerrainDraper.js.map +1 -1
- package/lib/esm/Tools/MapFeatureInfoDecorator.js.map +1 -1
- package/lib/esm/Tools/MapFeatureInfoTool.js.map +1 -1
- package/lib/esm/internal/GoogleMapsUtils.d.ts +9 -16
- package/lib/esm/internal/GoogleMapsUtils.d.ts.map +1 -1
- package/lib/esm/internal/GoogleMapsUtils.js +36 -40
- package/lib/esm/internal/GoogleMapsUtils.js.map +1 -1
- package/lib/esm/internal/NativeGoogleMapsSession.d.ts +29 -0
- package/lib/esm/internal/NativeGoogleMapsSession.d.ts.map +1 -0
- package/lib/esm/internal/NativeGoogleMapsSession.js +78 -0
- package/lib/esm/internal/NativeGoogleMapsSession.js.map +1 -0
- package/lib/esm/map-layers-formats.d.ts +2 -0
- package/lib/esm/map-layers-formats.d.ts.map +1 -1
- package/lib/esm/map-layers-formats.js +2 -0
- package/lib/esm/map-layers-formats.js.map +1 -1
- package/lib/esm/mapLayersFormats.d.ts +10 -0
- package/lib/esm/mapLayersFormats.d.ts.map +1 -1
- package/lib/esm/mapLayersFormats.js +5 -0
- package/lib/esm/mapLayersFormats.js.map +1 -1
- package/lib/public/locales/en/mapLayersFormats.json +18 -18
- package/package.json +18 -16
- package/lib/cjs/GoogleMaps/GoogleMapDecorator.d.ts +0 -36
- package/lib/cjs/GoogleMaps/GoogleMapDecorator.d.ts.map +0 -1
- package/lib/cjs/GoogleMaps/GoogleMapDecorator.js +0 -87
- package/lib/cjs/GoogleMaps/GoogleMapDecorator.js.map +0 -1
- package/lib/esm/GoogleMaps/GoogleMapDecorator.d.ts +0 -36
- package/lib/esm/GoogleMaps/GoogleMapDecorator.d.ts.map +0 -1
- package/lib/esm/GoogleMaps/GoogleMapDecorator.js +0 -82
- package/lib/esm/GoogleMaps/GoogleMapDecorator.js.map +0 -1
|
@@ -6,15 +6,15 @@ import { Base64EncodedString, ColorDef } from "@itwin/core-common";
|
|
|
6
6
|
/** @internal */
|
|
7
7
|
export class DefaultMarkerIcon {
|
|
8
8
|
static getSvgContent(color = ColorDef.fromString("#00AEEF")) {
|
|
9
|
-
return `<?xml version="1.0" encoding="utf-8"?>
|
|
10
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
11
|
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
12
|
-
viewBox="0 0 365 560" enable-background="new 0 0 365 560" xml:space="preserve">
|
|
13
|
-
<g>
|
|
14
|
-
<path fill="${color.toHexString()}" d="M182.9,551.7c0,0.1,0.2,0.3,0.2,0.3S358.3,283,358.3,194.6c0-130.1-88.8-186.7-175.4-186.9
|
|
15
|
-
C96.3,7.9,7.5,64.5,7.5,194.6c0,88.4,175.3,357.4,175.3,357.4S182.9,551.7,182.9,551.7z M122.2,187.2c0-33.6,27.2-60.8,60.8-60.8
|
|
16
|
-
c33.6,0,60.8,27.2,60.8,60.8S216.5,248,182.9,248C149.4,248,122.2,220.8,122.2,187.2z"/>
|
|
17
|
-
</g>
|
|
9
|
+
return `<?xml version="1.0" encoding="utf-8"?>
|
|
10
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
11
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
12
|
+
viewBox="0 0 365 560" enable-background="new 0 0 365 560" xml:space="preserve">
|
|
13
|
+
<g>
|
|
14
|
+
<path fill="${color.toHexString()}" d="M182.9,551.7c0,0.1,0.2,0.3,0.2,0.3S358.3,283,358.3,194.6c0-130.1-88.8-186.7-175.4-186.9
|
|
15
|
+
C96.3,7.9,7.5,64.5,7.5,194.6c0,88.4,175.3,357.4,175.3,357.4S182.9,551.7,182.9,551.7z M122.2,187.2c0-33.6,27.2-60.8,60.8-60.8
|
|
16
|
+
c33.6,0,60.8,27.2,60.8,60.8S216.5,248,182.9,248C149.4,248,122.2,220.8,122.2,187.2z"/>
|
|
17
|
+
</g>
|
|
18
18
|
</svg>`;
|
|
19
19
|
}
|
|
20
20
|
static getContent(color) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultMarkerIcon.js","sourceRoot":"","sources":["../../../src/Feature/DefaultMarkerIcon.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnE,gBAAgB;AAChB,MAAM,OAAO,iBAAiB;IACpB,MAAM,CAAC,aAAa,CAAC,QAAkB,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC;QAC3E,OAAO;;;;;oBAKS,KAAK,CAAC,WAAW,EAAE;;;;WAI5B,CAAC;IACV,CAAC;IAEM,MAAM,CAAC,UAAU,CAAC,KAAgB;QACvC,OAAO;YACL,WAAW,EAAE,eAAe;YAC5B,SAAS,EAAE,mBAAmB,CAAC,MAAM,CAAC,iBAAiB,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SAC9E,CAAC;IACJ,CAAC;CACF","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 { Base64EncodedString, ColorDef } from \"@itwin/core-common\";\n\n/** @internal */\nexport class DefaultMarkerIcon {\n private static getSvgContent(color: ColorDef = ColorDef.fromString(\"#00AEEF\")) {\n return `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n <!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n <svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n viewBox=\"0 0 365 560\" enable-background=\"new 0 0 365 560\" xml:space=\"preserve\">\n <g>\n <path fill=\"${color.toHexString()}\" d=\"M182.9,551.7c0,0.1,0.2,0.3,0.2,0.3S358.3,283,358.3,194.6c0-130.1-88.8-186.7-175.4-186.9\n C96.3,7.9,7.5,64.5,7.5,194.6c0,88.4,175.3,357.4,175.3,357.4S182.9,551.7,182.9,551.7z M122.2,187.2c0-33.6,27.2-60.8,60.8-60.8\n c33.6,0,60.8,27.2,60.8,60.8S216.5,248,182.9,248C149.4,248,122.2,220.8,122.2,187.2z\"/>\n </g>\n </svg>`;\n }\n\n public static getContent(color?: ColorDef) {\n return {\n contentType: \"image/svg+xml\",\n imageData: Base64EncodedString.encode(DefaultMarkerIcon.getSvgContent(color)),\n };\n }\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"DefaultMarkerIcon.js","sourceRoot":"","sources":["../../../src/Feature/DefaultMarkerIcon.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnE,gBAAgB;AAChB,MAAM,OAAO,iBAAiB;IACpB,MAAM,CAAC,aAAa,CAAC,QAAkB,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC;QAC3E,OAAO;;;;;oBAKS,KAAK,CAAC,WAAW,EAAE;;;;WAI5B,CAAC;IACV,CAAC;IAEM,MAAM,CAAC,UAAU,CAAC,KAAgB;QACvC,OAAO;YACL,WAAW,EAAE,eAAe;YAC5B,SAAS,EAAE,mBAAmB,CAAC,MAAM,CAAC,iBAAiB,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SAC9E,CAAC;IACJ,CAAC;CACF","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\r\nimport { Base64EncodedString, ColorDef } from \"@itwin/core-common\";\r\n\r\n/** @internal */\r\nexport class DefaultMarkerIcon {\r\n private static getSvgContent(color: ColorDef = ColorDef.fromString(\"#00AEEF\")) {\r\n return `<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n <!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n <svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\r\n viewBox=\"0 0 365 560\" enable-background=\"new 0 0 365 560\" xml:space=\"preserve\">\r\n <g>\r\n <path fill=\"${color.toHexString()}\" d=\"M182.9,551.7c0,0.1,0.2,0.3,0.2,0.3S358.3,283,358.3,194.6c0-130.1-88.8-186.7-175.4-186.9\r\n C96.3,7.9,7.5,64.5,7.5,194.6c0,88.4,175.3,357.4,175.3,357.4S182.9,551.7,182.9,551.7z M122.2,187.2c0-33.6,27.2-60.8,60.8-60.8\r\n c33.6,0,60.8,27.2,60.8,60.8S216.5,248,182.9,248C149.4,248,122.2,220.8,122.2,187.2z\"/>\r\n </g>\r\n </svg>`;\r\n }\r\n\r\n public static getContent(color?: ColorDef) {\r\n return {\r\n contentType: \"image/svg+xml\",\r\n imageData: Base64EncodedString.encode(DefaultMarkerIcon.getSvgContent(color)),\r\n };\r\n }\r\n}\r\n\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureCanvasRenderer.js","sourceRoot":"","sources":["../../../src/Feature/FeatureCanvasRenderer.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,2BAA2B,EAAuD,MAAM,sBAAsB,CAAC;AAIxH,gBAAgB;AAChB,MAAM,OAAO,qBAAsB,SAAQ,2BAA2B;IAC5D,QAAQ,CAA2B;IACnC,OAAO,CAAgC;IAE/C,IAAY,cAAc;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACe,oBAAoB,KAAuC,OAAO,IAAI,CAAC,CAAA,CAAC;IAExF,YAAY,OAAiC,EAAE,MAAqC,EAAE,oBAAgC;QACpH,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAES,SAAS;QACjB,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC5B,CAAC;IAES,SAAS;QACjB,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC5B,CAAC;IAES,MAAM,CAAC,CAAS,EAAE,CAAS;QACnC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7B,CAAC;IAES,MAAM,CAAC,CAAS,EAAE,CAAS;QACnC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7B,CAAC;IAES,KAAK,CAAC,IAAI;QAClB,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;IAES,KAAK,CAAC,MAAM;QACpB,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IACzB,CAAC;IAES,KAAK,CAAC,YAAY;IAC5B,CAAC;IAES,KAAK,CAAC,SAAS,CAAC,CAAS,EAAE,CAAS;QAC5C,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9C,CAAC;CACF","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 { FeatureGeometryBaseRenderer, FeatureSymbolizedRenderer, FeatureSymbologyRenderer } from \"@itwin/core-frontend\";\nimport { Transform } from \"@itwin/core-geometry\";\nimport { ArcGisSymbologyCanvasRenderer } from \"../ArcGisFeature/ArcGisSymbologyRenderer.js\";\n\n/** @internal */\nexport class FeatureCanvasRenderer extends FeatureGeometryBaseRenderer implements FeatureSymbolizedRenderer {\n private _context: CanvasRenderingContext2D;\n private _symbol: ArcGisSymbologyCanvasRenderer;\n\n public get symbolRenderer(): FeatureSymbologyRenderer {\n return this._symbol;\n }\n public override hasSymbologyRenderer(): this is FeatureSymbolizedRenderer {return true;}\n\n constructor(context: CanvasRenderingContext2D, symbol: ArcGisSymbologyCanvasRenderer, world2PixelTransform?: Transform) {\n super(world2PixelTransform);\n this._symbol = symbol;\n this._context = context;\n }\n\n protected beginPath() {\n this._context.beginPath();\n }\n\n protected closePath() {\n this._context.closePath();\n }\n\n protected lineTo(x: number, y: number) {\n this._context.lineTo(x, y);\n }\n\n protected moveTo(x: number, y: number) {\n this._context.moveTo(x, y);\n }\n\n protected async fill() {\n this._symbol.applyFillStyle(this._context);\n this._context.fill();\n }\n\n protected async stroke() {\n this._symbol.applyStrokeStyle(this._context);\n this._context.stroke();\n }\n\n protected async finishPoints() {\n }\n\n protected async drawPoint(x: number, y: number) {\n this._symbol.drawPoint(this._context, x, y);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FeatureCanvasRenderer.js","sourceRoot":"","sources":["../../../src/Feature/FeatureCanvasRenderer.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,2BAA2B,EAAuD,MAAM,sBAAsB,CAAC;AAIxH,gBAAgB;AAChB,MAAM,OAAO,qBAAsB,SAAQ,2BAA2B;IAC5D,QAAQ,CAA2B;IACnC,OAAO,CAAgC;IAE/C,IAAY,cAAc;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACe,oBAAoB,KAAuC,OAAO,IAAI,CAAC,CAAA,CAAC;IAExF,YAAY,OAAiC,EAAE,MAAqC,EAAE,oBAAgC;QACpH,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAES,SAAS;QACjB,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC5B,CAAC;IAES,SAAS;QACjB,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC5B,CAAC;IAES,MAAM,CAAC,CAAS,EAAE,CAAS;QACnC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7B,CAAC;IAES,MAAM,CAAC,CAAS,EAAE,CAAS;QACnC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7B,CAAC;IAES,KAAK,CAAC,IAAI;QAClB,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;IAES,KAAK,CAAC,MAAM;QACpB,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IACzB,CAAC;IAES,KAAK,CAAC,YAAY;IAC5B,CAAC;IAES,KAAK,CAAC,SAAS,CAAC,CAAS,EAAE,CAAS;QAC5C,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9C,CAAC;CACF","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\r\nimport { FeatureGeometryBaseRenderer, FeatureSymbolizedRenderer, FeatureSymbologyRenderer } from \"@itwin/core-frontend\";\r\nimport { Transform } from \"@itwin/core-geometry\";\r\nimport { ArcGisSymbologyCanvasRenderer } from \"../ArcGisFeature/ArcGisSymbologyRenderer.js\";\r\n\r\n/** @internal */\r\nexport class FeatureCanvasRenderer extends FeatureGeometryBaseRenderer implements FeatureSymbolizedRenderer {\r\n private _context: CanvasRenderingContext2D;\r\n private _symbol: ArcGisSymbologyCanvasRenderer;\r\n\r\n public get symbolRenderer(): FeatureSymbologyRenderer {\r\n return this._symbol;\r\n }\r\n public override hasSymbologyRenderer(): this is FeatureSymbolizedRenderer {return true;}\r\n\r\n constructor(context: CanvasRenderingContext2D, symbol: ArcGisSymbologyCanvasRenderer, world2PixelTransform?: Transform) {\r\n super(world2PixelTransform);\r\n this._symbol = symbol;\r\n this._context = context;\r\n }\r\n\r\n protected beginPath() {\r\n this._context.beginPath();\r\n }\r\n\r\n protected closePath() {\r\n this._context.closePath();\r\n }\r\n\r\n protected lineTo(x: number, y: number) {\r\n this._context.lineTo(x, y);\r\n }\r\n\r\n protected moveTo(x: number, y: number) {\r\n this._context.moveTo(x, y);\r\n }\r\n\r\n protected async fill() {\r\n this._symbol.applyFillStyle(this._context);\r\n this._context.fill();\r\n }\r\n\r\n protected async stroke() {\r\n this._symbol.applyStrokeStyle(this._context);\r\n this._context.stroke();\r\n }\r\n\r\n protected async finishPoints() {\r\n }\r\n\r\n protected async drawPoint(x: number, y: number) {\r\n this._symbol.drawPoint(this._context, x, y);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureInfoReader.js","sourceRoot":"","sources":["../../../src/Feature/FeatureInfoReader.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAc,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAEtE;;GAEG;AACH,MAAM,OAAgB,iBAAiB;IAErC,gDAAgD;IACzC,cAAc,CAAmB;IAExC,kDAAkD;IAClD,mEAAmE;IAC5D,0BAA0B,GAAG,KAAK,CAAC;IAEhC,qBAAqB,GAAG,CAAC,KAAa,EAAE,EAAE;QAClD,OAAO,CAAC,IAAI,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IACtG,CAAC,CAAC;IAEQ,eAAe,GAAG,CAAC,QAA2B,EAAE,KAAiC,EAAE,EAAE;QAC7F,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,OAAQ,EAAE,CAAC;QACb,CAAC;aAAM,IAAK,QAAQ,KAAK,iBAAiB,CAAC,QAAQ,IAAI,IAAI,CAAC,0BAA0B,EAAE,CAAC;YACvF,OAAQ,KAAc,CAAC,WAAW,EAAE,CAAC;QACvC,CAAC;aAAM,CAAC;YACN,gEAAgE;YAChE,OAAO,GAAG,KAAK,EAAE,CAAC;QACpB,CAAC;IACH,CAAC,CAAC;CAEH","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 { Primitives, StandardTypeNames } from \"@itwin/appui-abstract\";\n\n/** Base feature infos reader\n * @internal\n */\nexport abstract class FeatureInfoReader {\n\n // Optionally you can set the floating precision\n public floatPrecision: number|undefined;\n\n // Force display value of date to ISO 8601 format.\n // Turning this ON, will disable display value in end-user's locale\n public forceDateDisplayValueToIso = false;\n\n protected toFixedWithoutPadding = (value: number) => {\n return (this.floatPrecision === undefined ? value : parseFloat(value.toFixed(this.floatPrecision)));\n };\n\n protected getDisplayValue = (typename: StandardTypeNames, value: Primitives.Value|undefined) => {\n if (value === undefined) {\n return \"\";\n } else if ( typename === StandardTypeNames.DateTime && this.forceDateDisplayValueToIso) {\n return (value as Date).toISOString();\n } else {\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n return `${value}`;\n }\n };\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FeatureInfoReader.js","sourceRoot":"","sources":["../../../src/Feature/FeatureInfoReader.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAc,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAEtE;;GAEG;AACH,MAAM,OAAgB,iBAAiB;IAErC,gDAAgD;IACzC,cAAc,CAAmB;IAExC,kDAAkD;IAClD,mEAAmE;IAC5D,0BAA0B,GAAG,KAAK,CAAC;IAEhC,qBAAqB,GAAG,CAAC,KAAa,EAAE,EAAE;QAClD,OAAO,CAAC,IAAI,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IACtG,CAAC,CAAC;IAEQ,eAAe,GAAG,CAAC,QAA2B,EAAE,KAAiC,EAAE,EAAE;QAC7F,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,OAAQ,EAAE,CAAC;QACb,CAAC;aAAM,IAAK,QAAQ,KAAK,iBAAiB,CAAC,QAAQ,IAAI,IAAI,CAAC,0BAA0B,EAAE,CAAC;YACvF,OAAQ,KAAc,CAAC,WAAW,EAAE,CAAC;QACvC,CAAC;aAAM,CAAC;YACN,gEAAgE;YAChE,OAAO,GAAG,KAAK,EAAE,CAAC;QACpB,CAAC;IACH,CAAC,CAAC;CAEH","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\r\nimport { Primitives, StandardTypeNames } from \"@itwin/appui-abstract\";\r\n\r\n/** Base feature infos reader\r\n * @internal\r\n */\r\nexport abstract class FeatureInfoReader {\r\n\r\n // Optionally you can set the floating precision\r\n public floatPrecision: number|undefined;\r\n\r\n // Force display value of date to ISO 8601 format.\r\n // Turning this ON, will disable display value in end-user's locale\r\n public forceDateDisplayValueToIso = false;\r\n\r\n protected toFixedWithoutPadding = (value: number) => {\r\n return (this.floatPrecision === undefined ? value : parseFloat(value.toFixed(this.floatPrecision)));\r\n };\r\n\r\n protected getDisplayValue = (typename: StandardTypeNames, value: Primitives.Value|undefined) => {\r\n if (value === undefined) {\r\n return \"\";\r\n } else if ( typename === StandardTypeNames.DateTime && this.forceDateDisplayValueToIso) {\r\n return (value as Date).toISOString();\r\n } else {\r\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\r\n return `${value}`;\r\n }\r\n };\r\n\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureSymbology.js","sourceRoot":"","sources":["../../../src/Feature/FeatureSymbology.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,gBAAgB;AAChB,MAAM,OAAgB,gBAAgB;CAErC","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/** @internal */\nexport abstract class FeatureSymbology {\n\n}\n\n/** @internal */\nexport interface FeatureDefaultSymbology {\n getSymbology: (geometryType: string) => FeatureSymbology;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FeatureSymbology.js","sourceRoot":"","sources":["../../../src/Feature/FeatureSymbology.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,gBAAgB;AAChB,MAAM,OAAgB,gBAAgB;CAErC","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\r\n/** @internal */\r\nexport abstract class FeatureSymbology {\r\n\r\n}\r\n\r\n/** @internal */\r\nexport interface FeatureDefaultSymbology {\r\n getSymbology: (geometryType: string) => FeatureSymbology;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RandomMapColor.js","sourceRoot":"","sources":["../../../src/Feature/RandomMapColor.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,gBAAgB;AAChB,MAAM,OAAO,cAAc;IACjB,MAAM,CAAU,kBAAkB,GAAG;QAC3C,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;KAClG,CAAC;IAEK,QAAQ;QACb,OAAO,cAAc,CAAC,kBAAkB,CAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,cAAc,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;IAClH,CAAC;IAEM,WAAW;QAChB,OAAO,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9C,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\nimport { ColorDef } from \"@itwin/core-common\";\n\n/** @internal */\nexport class RandomMapColor {\n private static readonly randomColorPalette = [\n \"#8c510a\", \"#bf812d\", \"#dfc27d\", \"#f6e8c3\", \"#f5f5f5\", \"#c7eae5\", \"#80cdc1\", \"#35978f\", \"#01665e\",\n \"#b2182b\", \"#d6604d\", \"#f4a582\", \"#fddbc7\", \"#f7f7f7\", \"#d1e5f0\", \"#92c5de\", \"#4393c3\", \"#2166ac\",\n \"#d73027\", \"#f46d43\", \"#fdae61\", \"#fee090\", \"#ffffbf\", \"#e0f3f8\", \"#abd9e9\", \"#74add1\", \"#4575b4\",\n \"#a6cee3\", \"#1f78b4\", \"#b2df8a\", \"#33a02c\", \"#fb9a99\", \"#e31c2c\", \"#fdbf6f\", \"#ff7f00\", \"#cab2d6\",\n \"#fbb4ae\", \"#e41a1c\", \"#377eb8\", \"#4daf4a\", \"#984ea3\", \"#ff2000\", \"#ffff33\", \"#a65628\", \"#999999\",\n \"#8dd3c7\", \"#ffffb3\", \"#bebada\", \"#fb8072\", \"#80b1d3\", \"#fdb462\", \"#b3de69\", \"#fccde5\", \"#ffa07a\",\n \"#b15928\", \"#6a3d9a\", \"#ffed6f\", \"#9e0142\", \"#5e4fa2\", \"#999900\", \"#1a9850\", \"#4d4d4d\", \"#6baed6\",\n \"#71c671\", \"#388e8e\", \"#7d9ec0\", \"#7171c6\", \"#8e388e\", \"#8e8e38\", \"#00c957\", \"#cc3333\", \"#d1dbdd\",\n ];\n\n public getColor() {\n return RandomMapColor.randomColorPalette[ Math.floor(Math.random() * RandomMapColor.randomColorPalette.length)];\n }\n\n public getColorDef() {\n return ColorDef.fromString(this.getColor());\n }\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"RandomMapColor.js","sourceRoot":"","sources":["../../../src/Feature/RandomMapColor.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,gBAAgB;AAChB,MAAM,OAAO,cAAc;IACjB,MAAM,CAAU,kBAAkB,GAAG;QAC3C,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACjG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;KAClG,CAAC;IAEK,QAAQ;QACb,OAAO,cAAc,CAAC,kBAAkB,CAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,cAAc,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;IAClH,CAAC;IAEM,WAAW;QAChB,OAAO,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9C,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\r\nimport { ColorDef } from \"@itwin/core-common\";\r\n\r\n/** @internal */\r\nexport class RandomMapColor {\r\n private static readonly randomColorPalette = [\r\n \"#8c510a\", \"#bf812d\", \"#dfc27d\", \"#f6e8c3\", \"#f5f5f5\", \"#c7eae5\", \"#80cdc1\", \"#35978f\", \"#01665e\",\r\n \"#b2182b\", \"#d6604d\", \"#f4a582\", \"#fddbc7\", \"#f7f7f7\", \"#d1e5f0\", \"#92c5de\", \"#4393c3\", \"#2166ac\",\r\n \"#d73027\", \"#f46d43\", \"#fdae61\", \"#fee090\", \"#ffffbf\", \"#e0f3f8\", \"#abd9e9\", \"#74add1\", \"#4575b4\",\r\n \"#a6cee3\", \"#1f78b4\", \"#b2df8a\", \"#33a02c\", \"#fb9a99\", \"#e31c2c\", \"#fdbf6f\", \"#ff7f00\", \"#cab2d6\",\r\n \"#fbb4ae\", \"#e41a1c\", \"#377eb8\", \"#4daf4a\", \"#984ea3\", \"#ff2000\", \"#ffff33\", \"#a65628\", \"#999999\",\r\n \"#8dd3c7\", \"#ffffb3\", \"#bebada\", \"#fb8072\", \"#80b1d3\", \"#fdb462\", \"#b3de69\", \"#fccde5\", \"#ffa07a\",\r\n \"#b15928\", \"#6a3d9a\", \"#ffed6f\", \"#9e0142\", \"#5e4fa2\", \"#999900\", \"#1a9850\", \"#4d4d4d\", \"#6baed6\",\r\n \"#71c671\", \"#388e8e\", \"#7d9ec0\", \"#7171c6\", \"#8e388e\", \"#8e8e38\", \"#00c957\", \"#cc3333\", \"#d1dbdd\",\r\n ];\r\n\r\n public getColor() {\r\n return RandomMapColor.randomColorPalette[ Math.floor(Math.random() * RandomMapColor.randomColorPalette.length)];\r\n }\r\n\r\n public getColorDef() {\r\n return ColorDef.fromString(this.getColor());\r\n }\r\n}\r\n\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeoJSONGeometry.js","sourceRoot":"","sources":["../../../src/GeoJSON/GeoJSONGeometry.ts"],"names":[],"mappings":"AAqBA,gBAAgB;AAChB,MAAM,OAAO,oBAAoB;IACxB,MAAM,CAAC,YAAY,CAAC,IAAsB,IAAG,OAAO,IAAI,CAAC,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,IAAI,KAAK,iBAAiB,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,CAAA,CAAC;IAC9K,MAAM,CAAC,QAAQ,CAAC,IAAsB,IAAG,OAAQ,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,CAAA,CAAC;IAC1G,MAAM,CAAC,OAAO,CAAC,IAAsB,IAAG,OAAO,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,CAAA,CAAC;CAC5G","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*--------------------------------------------------------------------------------------------*/\nimport GeoJson from \"geojson\";\n\n/** @internal */\nexport type Coord = number[];\n\n/** @internal */ // Array of 2 or 3 numbers\nexport type RingCoords = Coord[];\n\n/** @internal */\nexport type MultiRingCoords = RingCoords[];\n\n/** @internal */\nexport interface MultiPath {\n lengths: number[];\n coords: number[];\n}\n\n/** @internal */\nexport class GeoJSONGeometryUtils {\n public static isRingOrPath(geom: GeoJson.Geometry) {return geom.type === \"LineString\" || geom.type === \"MultiLineString\" || geom.type === \"Polygon\" || geom.type === \"MultiPolygon\";}\n public static isFilled(geom: GeoJson.Geometry) {return geom.type === \"Polygon\" || geom.type === \"MultiPolygon\";}\n public static isPoint(geom: GeoJson.Geometry) {return geom.type === \"Point\" || geom.type === \"MultiPoint\";}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GeoJSONGeometry.js","sourceRoot":"","sources":["../../../src/GeoJSON/GeoJSONGeometry.ts"],"names":[],"mappings":"AAqBA,gBAAgB;AAChB,MAAM,OAAO,oBAAoB;IACxB,MAAM,CAAC,YAAY,CAAC,IAAsB,IAAG,OAAO,IAAI,CAAC,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,IAAI,KAAK,iBAAiB,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,CAAA,CAAC;IAC9K,MAAM,CAAC,QAAQ,CAAC,IAAsB,IAAG,OAAQ,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,CAAA,CAAC;IAC1G,MAAM,CAAC,OAAO,CAAC,IAAsB,IAAG,OAAO,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,CAAA,CAAC;CAC5G","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\nimport GeoJson from \"geojson\";\r\n\r\n/** @internal */\r\nexport type Coord = number[];\r\n\r\n/** @internal */ // Array of 2 or 3 numbers\r\nexport type RingCoords = Coord[];\r\n\r\n/** @internal */\r\nexport type MultiRingCoords = RingCoords[];\r\n\r\n/** @internal */\r\nexport interface MultiPath {\r\n lengths: number[];\r\n coords: number[];\r\n}\r\n\r\n/** @internal */\r\nexport class GeoJSONGeometryUtils {\r\n public static isRingOrPath(geom: GeoJson.Geometry) {return geom.type === \"LineString\" || geom.type === \"MultiLineString\" || geom.type === \"Polygon\" || geom.type === \"MultiPolygon\";}\r\n public static isFilled(geom: GeoJson.Geometry) {return geom.type === \"Polygon\" || geom.type === \"MultiPolygon\";}\r\n public static isPoint(geom: GeoJson.Geometry) {return geom.type === \"Point\" || geom.type === \"Mult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;YAC3B,CAAC;QACH,CAAC;QAED,IAAI,KAAK,EAAE,CAAC;YACV,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,MAAM,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,cAAc,CAAC,CAAC;YAChF,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,cAAc,CAAC,CAAC;QAC1F,CAAC;IAEH,CAAC;IAEO,KAAK,CAAC,UAAU,CAAC,IAAsB,EAAE,QAAiC,EAAE,cAAuB;QAEzG,MAAM,OAAO,GAAU,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAU,EAAE,CAAC;QACzB,MAAM,SAAS,GAAG,CAAC,KAAY,EAAE,EAAE;YACjC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACxB,CAAC,CAAC;QAEF,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;YAC/B,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACtC,CAAC;aAAM,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YACjC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC9B,CAAC;QAED,MAAM,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,cAAc,CAAC,CAAC;IACjE,CAAC;CACF","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 { Logger } from \"@itwin/core-bentley\";\nimport { deflateCoordinates, FeatureGeometryRenderer } from \"@itwin/core-frontend\";\nimport GeoJson from \"geojson\";\nimport { Coord, GeoJSONGeometryUtils, MultiPath, MultiRingCoords, RingCoords } from \"./GeoJSONGeometry.js\";\n\nconst loggerCategory = \"MapLayersFormats.GeoJSONGeometryReader\";\n\n/** @internal */\nexport class GeoJSONGeometryReader {\n private _renderer: FeatureGeometryRenderer;\n\n public constructor(renderer: FeatureGeometryRenderer) {\n this._renderer = renderer;\n }\n\n public async readGeometry(geometry: GeoJson.Geometry) {\n\n if (GeoJSONGeometryUtils.isRingOrPath(geometry)) {\n await this.readRingsAndPaths(geometry, this._renderer, GeoJSONGeometryUtils.isFilled(geometry), false /* relativeCoords*/);\n } else if (GeoJSONGeometryUtils.isPoint(geometry)) {\n await this.readPoints(geometry, this._renderer, false/* relativeCoords*/);\n } else {\n Logger.logError(loggerCategory, `GeoJSONGeometryReader:readGeometry - Unknown geometry type '${geometry.type}'`);\n }\n }\n\n private async readRingsAndPaths(geometry: GeoJson.Geometry, renderer: FeatureGeometryRenderer, fill: boolean, relativeCoords: boolean) {\n const multiPath: MultiPath = {coords: [], lengths: []};\n let polys: MultiPath[] | undefined;\n\n const readPath = (ring: RingCoords, offset: number, result: MultiPath) => {\n const newOffset = deflateCoordinates(ring, result.coords, 2, offset);\n result.lengths.push(ring.length);\n return newOffset;\n };\n\n const readMultiPath = (multiRings: MultiRingCoords, result: MultiPath) => {\n let offset = 0;\n for (const ring of multiRings) {\n offset = readPath(ring, offset, result);\n }\n };\n\n if (geometry.type === \"LineString\") {\n readPath(geometry.coordinates, 0, multiPath);\n } else if (geometry.type === \"MultiLineString\" || geometry.type === \"Polygon\") {\n readMultiPath(geometry.coordinates, multiPath);\n } else if (geometry.type === \"MultiPolygon\") {\n polys = [];\n for (const poly of geometry.coordinates) {\n const tmpMultiPath: MultiPath = {coords: [], lengths: [] };\n readMultiPath(poly, tmpMultiPath);\n polys.push(tmpMultiPath);\n }\n }\n\n if (polys) {\n for (const poly of polys) {\n await renderer.renderPath(poly.lengths, poly.coords, fill, 2, relativeCoords);\n }\n } else {\n await renderer.renderPath(multiPath.lengths, multiPath.coords, fill, 2, relativeCoords);\n }\n\n }\n\n private async readPoints(geom: GeoJson.Geometry, renderer: FeatureGeometryRenderer, relativeCoords: boolean) {\n\n const lengths: Coord = [];\n const coords: Coord = [];\n const readPoint = (coord: Coord) => {\n lengths.push(1);\n coords.push(coord[0]);\n coords.push(coord[1]);\n };\n\n if (geom.type === \"MultiPoint\") {\n geom.coordinates.forEach(readPoint);\n } else if (geom.type === \"Point\") {\n readPoint(geom.coordinates);\n }\n\n await renderer.renderPoint(lengths, coords, 2, relativeCoords);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GeoJSONGeometryReader.js","sourceRoot":"","sources":["../../../src/GeoJSON/GeoJSONGeometryReader.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAA2B,MAAM,sBAAsB,CAAC;AAEnF,OAAO,EAAS,oBAAoB,EAA0C,MAAM,sBAAsB,CAAC;AAE3G,MAAM,cAAc,GAAG,wCAAwC,CAAC;AAEhE,gBAAgB;AAChB,MAAM,OAAO,qBAAqB;IACxB,SAAS,CAA0B;IAE3C,YAAmB,QAAiC;QAClD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,QAA0B;QAElD,IAAI,oBAAoB,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC;YAChD,MAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,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AAC,CAAC,CAAC,CAAC;QACxB,CAAC,CAAC;QAEF,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;YAC/B,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACtC,CAAC;aAAM,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YACjC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC9B,CAAC;QAED,MAAM,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,cAAc,CAAC,CAAC;IACjE,CAAC;CACF","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\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { deflateCoordinates, FeatureGeometryRenderer } from \"@itwin/core-frontend\";\r\nimport GeoJson from \"geojson\";\r\nimport { Coord, GeoJSONGeometryUtils, MultiPath, MultiRingCoords, RingCoords } from \"./GeoJSONGeometry.js\";\r\n\r\nconst loggerCategory = \"MapLayersFormats.GeoJSONGeometryReader\";\r\n\r\n/** @internal */\r\nexport class GeoJSONGeometryReader {\r\n private _renderer: FeatureGeometryRenderer;\r\n\r\n public constructor(renderer: FeatureGeometryRenderer) {\r\n this._renderer = renderer;\r\n }\r\n\r\n public async readGeometry(geometry: GeoJson.Geometry) {\r\n\r\n if (GeoJSONGeometryUtils.isRingOrPath(geometry)) {\r\n await this.readRingsAndPaths(geometry, this._renderer, GeoJSONGeometryUtils.isFilled(geometry), false /* relativeCoords*/);\r\n } else if (GeoJSONGeometryUtils.isPoint(geometry)) {\r\n await this.readPoints(geometry, this._renderer, false/* relativeCoords*/);\r\n } else {\r\n Logger.logError(loggerCategory, `GeoJSONGeometryReader:readGeometry - Unknown geometry type '${geometry.type}'`);\r\n }\r\n }\r\n\r\n private async readRingsAndPaths(geometry: GeoJson.Geometry, renderer: FeatureGeometryRenderer, fill: boolean, relativeCoords: boolean) {\r\n const multiPath: MultiPath = {coords: [], lengths: []};\r\n let polys: MultiPath[] | undefined;\r\n\r\n const readPath = (ring: RingCoords, offset: number, result: MultiPath) => {\r\n const newOffset = deflateCoordinates(ring, result.coords, 2, offset);\r\n result.lengths.push(ring.length);\r\n return newOffset;\r\n };\r\n\r\n const readMultiPath = (multiRings: MultiRingCoords, result: MultiPath) => {\r\n let offset = 0;\r\n for (const ring of multiRings) {\r\n offset = readPath(ring, offset, result);\r\n }\r\n };\r\n\r\n if (geometry.type === \"LineString\") {\r\n readPath(geometry.coordinates, 0, multiPath);\r\n } else if (geometry.type === \"MultiLineString\" || geometry.type === \"Polygon\") {\r\n readMultiPath(geometry.coordinates, multiPath);\r\n } else if (geometry.type === \"MultiPolygon\") {\r\n polys = [];\r\n for (const poly of geometry.coordinates) {\r\n const tmpMultiPath: MultiPath = {coords: [], lengths: [] };\r\n readMultiPath(poly, tmpMultiPath);\r\n polys.push(tmpMultiPath);\r\n }\r\n }\r\n\r\n if (polys) {\r\n for (const poly of polys) {\r\n await renderer.renderPath(poly.lengths, poly.coords, fill, 2, relativeCoords);\r\n }\r\n } else {\r\n await renderer.renderPath(multiPath.lengths, multiPath.coords, fill, 2, relativeCoords);\r\n }\r\n\r\n }\r\n\r\n private async readPoints(geom: GeoJson.Geometry, renderer: FeatureGeometryRenderer, relativeCoords: boolean) {\r\n\r\n const lengths: Coord = [];\r\n const coords: Coord = [];\r\n const readPoint = (coord: Coord) => {\r\n lengths.push(1);\r\n coords.push(coord[0]);\r\n coords.push(coord[1]);\r\n };\r\n\r\n if (geom.type === \"MultiPoint\") {\r\n geom.coordinates.forEach(readPoint);\r\n } else if (geom.type === \"Point\") {\r\n readPoint(geom.coordinates);\r\n }\r\n\r\n await renderer.renderPoint(lengths, coords, 2, relativeCoords);\r\n }\r\n}\r\n"]}
|
|
@@ -2,131 +2,7 @@
|
|
|
2
2
|
* @module MapLayersFormats
|
|
3
3
|
*/
|
|
4
4
|
import { BaseMapLayerSettings, ImageMapLayerSettings } from "@itwin/core-common";
|
|
5
|
-
import {
|
|
6
|
-
/**
|
|
7
|
-
* The type of base map.
|
|
8
|
-
* @beta*/
|
|
9
|
-
export type GoogleMapsLayerTypes = "layerRoadmap" | "layerStreetview";
|
|
10
|
-
/**
|
|
11
|
-
* Layer types that can be added to the map.
|
|
12
|
-
* @beta
|
|
13
|
-
* */
|
|
14
|
-
export type GoogleMapsMapTypes = "roadmap" | "satellite" | "terrain";
|
|
15
|
-
/**
|
|
16
|
-
* Scale factors that can be applied to labels and objects in the map.
|
|
17
|
-
* @beta
|
|
18
|
-
* */
|
|
19
|
-
export type GoogleMapsScaleFactors = "scaleFactor1x" | "scaleFactor2x" | "scaleFactor4x";
|
|
20
|
-
/**
|
|
21
|
-
* Represents the options to create a Google Maps session.
|
|
22
|
-
* @beta
|
|
23
|
-
*/
|
|
24
|
-
export interface GoogleMapsCreateSessionOptions {
|
|
25
|
-
/**
|
|
26
|
-
* The type of base map.
|
|
27
|
-
*
|
|
28
|
-
* `roadmap`: The standard Google Maps painted map tiles.
|
|
29
|
-
*
|
|
30
|
-
* `satellite`: Satellite imagery.
|
|
31
|
-
*
|
|
32
|
-
* `terrain`: Terrain imagery. When selecting `terrain` as the map type, you must also include the `layerRoadmap` layer type.
|
|
33
|
-
* @beta
|
|
34
|
-
* */
|
|
35
|
-
mapType: GoogleMapsMapTypes;
|
|
36
|
-
/**
|
|
37
|
-
* An {@link https://en.wikipedia.org/wiki/IETF_language_tag | IETF language tag} that specifies the language used to display information on the tiles. For example, `en-US` specifies the English language as spoken in the United States.
|
|
38
|
-
*/
|
|
39
|
-
language: string;
|
|
40
|
-
/**
|
|
41
|
-
* A {@link https://cldr.unicode.org/ | Common Locale Data Repository} region identifier (two uppercase letters) that represents the physical location of the user. For example, `US`.
|
|
42
|
-
*/
|
|
43
|
-
region: string;
|
|
44
|
-
/**
|
|
45
|
-
* An array of values that specifies the layer types added to the map.
|
|
46
|
-
*
|
|
47
|
-
* `layerRoadmap`: Required if you specify terrain as the map type. Can also be optionally overlaid on the satellite map type. Has no effect on roadmap tiles.
|
|
48
|
-
*
|
|
49
|
-
* `layerStreetview`: Shows Street View-enabled streets and locations using blue outlines on the map.
|
|
50
|
-
*
|
|
51
|
-
* @beta
|
|
52
|
-
* */
|
|
53
|
-
layerTypes?: GoogleMapsLayerTypes[];
|
|
54
|
-
/**
|
|
55
|
-
* Scales-up the size of map elements (such as road labels), while retaining the tile size and coverage area of the default tile.
|
|
56
|
-
* Increasing the scale also reduces the number of labels on the map, which reduces clutter.
|
|
57
|
-
*
|
|
58
|
-
* `scaleFactor1x`: The default.
|
|
59
|
-
*
|
|
60
|
-
* `scaleFactor2x`: Doubles label size and removes minor feature labels.
|
|
61
|
-
*
|
|
62
|
-
* `scaleFactor4x`: Quadruples label size and removes minor feature labels.
|
|
63
|
-
* @beta
|
|
64
|
-
* */
|
|
65
|
-
scale?: GoogleMapsScaleFactors;
|
|
66
|
-
/**
|
|
67
|
-
* A boolean value that specifies whether layerTypes should be rendered as a separate overlay, or combined with the base imagery.
|
|
68
|
-
* When true, the base map isn't displayed. If you haven't defined any layerTypes, then this value is ignored.
|
|
69
|
-
* Default is false.
|
|
70
|
-
* @beta
|
|
71
|
-
* */
|
|
72
|
-
overlay?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* An array of values specifying additional options to apply.
|
|
75
|
-
* @beta
|
|
76
|
-
* */
|
|
77
|
-
apiOptions?: string[];
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Structure representing a Google Maps session.
|
|
81
|
-
* @beta
|
|
82
|
-
*/
|
|
83
|
-
export interface GoogleMapsSession {
|
|
84
|
-
/** A session token value that you must include in all of your Map Tiles API requests. */
|
|
85
|
-
session: string;
|
|
86
|
-
/** string that contains the time (in seconds since the epoch) at which the token expires. A session token is valid for two weeks from its creation time, but this policy might change without notice. */
|
|
87
|
-
expiry: number;
|
|
88
|
-
/** The width of the tiles measured in pixels. */
|
|
89
|
-
tileWidth: number;
|
|
90
|
-
/** he height of the tiles measured in pixels. */
|
|
91
|
-
tileHeight: number;
|
|
92
|
-
/** The image format, which can be either `png` or `jpeg`. */
|
|
93
|
-
imageFormat: string;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Represents the maximum zoom level available within a bounding rectangle.
|
|
97
|
-
* @beta
|
|
98
|
-
*/
|
|
99
|
-
export interface MaxZoomRectangle {
|
|
100
|
-
maxZoom: number;
|
|
101
|
-
north: number;
|
|
102
|
-
south: number;
|
|
103
|
-
east: number;
|
|
104
|
-
west: number;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Indicate which areas of given viewport have imagery, and at which zoom levels.
|
|
108
|
-
* @beta
|
|
109
|
-
*/
|
|
110
|
-
export interface ViewportInfo {
|
|
111
|
-
/** Attribution string that you must display on your map when you display roadmap and satellite tiles. */
|
|
112
|
-
copyright: string;
|
|
113
|
-
/** Array of bounding rectangles that overlap with the current viewport. Also contains the maximum zoom level available within each rectangle.. */
|
|
114
|
-
maxZoomRects: MaxZoomRectangle[];
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Request parameters for the getViewportInfo method.
|
|
118
|
-
* @beta
|
|
119
|
-
*/
|
|
120
|
-
export interface ViewportInfoRequestParams {
|
|
121
|
-
/** Bounding rectangle */
|
|
122
|
-
rectangle: MapCartoRectangle;
|
|
123
|
-
/** Session token */
|
|
124
|
-
session: string;
|
|
125
|
-
/** The Google Cloud API key */
|
|
126
|
-
key: string;
|
|
127
|
-
/** Zoom level of the viewport */
|
|
128
|
-
zoom: number;
|
|
129
|
-
}
|
|
5
|
+
import { GoogleMapsCreateSessionOptions } from "./GoogleMapsSession.js";
|
|
130
6
|
/**
|
|
131
7
|
* Google Maps API
|
|
132
8
|
* @beta
|
|
@@ -162,5 +38,12 @@ export declare const GoogleMaps: {
|
|
|
162
38
|
* @beta
|
|
163
39
|
*/
|
|
164
40
|
createBaseLayerSettings: (opts?: GoogleMapsCreateSessionOptions) => BaseMapLayerSettings;
|
|
41
|
+
/**
|
|
42
|
+
* Read the session options from the map layer settings.
|
|
43
|
+
* @param settings Map layer settings
|
|
44
|
+
* ```
|
|
45
|
+
* @beta
|
|
46
|
+
*/
|
|
47
|
+
getMapLayerSessionOptions: (settings: ImageMapLayerSettings) => GoogleMapsCreateSessionOptions;
|
|
165
48
|
};
|
|
166
49
|
//# sourceMappingURL=GoogleMaps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleMaps.d.ts","sourceRoot":"","sources":["../../../src/GoogleMaps/GoogleMaps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"GoogleMaps.d.ts","sourceRoot":"","sources":["../../../src/GoogleMaps/GoogleMaps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AAIxE;;;EAGE;AAEF,eAAO,MAAM,UAAU;IACrB;;;;;;;;;;;;;MAaE;oCAC8B,MAAM,SAAS,8BAA8B;IAI7E;;;;;;;;;;;;;MAaE;qCAC+B,8BAA8B;IAI/D;;;;;MAKE;0CACoC,qBAAqB;CAG5D,CAAC"}
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { BaseMapLayerSettings, ImageMapLayerSettings } from "@itwin/core-common";
|
|
9
9
|
import { GoogleMapsUtils } from "../internal/GoogleMapsUtils.js";
|
|
10
|
-
;
|
|
11
|
-
;
|
|
12
10
|
/**
|
|
13
11
|
* Google Maps API
|
|
14
12
|
* @beta
|
|
@@ -48,6 +46,15 @@ export const GoogleMaps = {
|
|
|
48
46
|
*/
|
|
49
47
|
createBaseLayerSettings: (opts) => {
|
|
50
48
|
return BaseMapLayerSettings.fromJSON(GoogleMapsUtils.createMapLayerProps("GoogleMaps", opts));
|
|
51
|
-
}
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* Read the session options from the map layer settings.
|
|
52
|
+
* @param settings Map layer settings
|
|
53
|
+
* ```
|
|
54
|
+
* @beta
|
|
55
|
+
*/
|
|
56
|
+
getMapLayerSessionOptions: (settings) => {
|
|
57
|
+
return GoogleMapsUtils.getSessionOptionsFromMapLayer(settings);
|
|
58
|
+
},
|
|
52
59
|
};
|
|
53
60
|
//# sourceMappingURL=GoogleMaps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleMaps.js","sourceRoot":"","sources":["../../../src/GoogleMaps/GoogleMaps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEjF,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"GoogleMaps.js","sourceRoot":"","sources":["../../../src/GoogleMaps/GoogleMaps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEjF,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAGjE;;;EAGE;AACF,gEAAgE;AAChE,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB;;;;;;;;;;;;;MAaE;IACF,sBAAsB,EAAE,CAAC,IAAa,EAAE,IAAqC,EAAE,EAAE;QAC/E,OAAO,qBAAqB,CAAC,QAAQ,CAAC,eAAe,CAAC,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;;;MAaE;IACF,uBAAuB,EAAE,CAAC,IAAqC,EAAE,EAAE;QACjE,OAAO,oBAAoB,CAAC,QAAQ,CAAC,eAAe,CAAC,mBAAmB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;IAChG,CAAC;IAED;;;;;MAKE;IACF,yBAAyB,EAAE,CAAC,QAA+B,EAAE,EAAE;QAC7D,OAAO,eAAe,CAAC,6BAA6B,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;CACF,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 MapLayersFormats\r\n */\r\n\r\nimport { BaseMapLayerSettings, ImageMapLayerSettings } from \"@itwin/core-common\";\r\nimport { GoogleMapsCreateSessionOptions } from \"./GoogleMapsSession.js\";\r\nimport { GoogleMapsUtils } from \"../internal/GoogleMapsUtils.js\";\r\n\r\n\r\n/**\r\n * Google Maps API\r\n * @beta\r\n*/\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const GoogleMaps = {\r\n /**\r\n * Creates Google Maps map-layer settings.\r\n * @param name Name of the layer (Defaults to \"GoogleMaps\")\r\n * @param opts Options to create the session (Defaults to satellite map type, English language, US region, and roadmap layer type)\r\n *\r\n * The following examples illustrates how a Googles Map layer can be attached to a viewport:\r\n * ```ts\r\n * [[include:GoogleMaps_AttachMapLayerSimple]]\r\n * ```\r\n * ```ts\r\n * [[include:GoogleMaps_AttachMapLayerOpts]]\r\n * ```\r\n * @beta\r\n */\r\n createMapLayerSettings: (name?: string, opts?: GoogleMapsCreateSessionOptions) => {\r\n return ImageMapLayerSettings.fromJSON(GoogleMapsUtils.createMapLayerProps(name, opts));\r\n },\r\n\r\n /**\r\n * Creates Google Maps base layer settings.\r\n * @param name Name of the layer (Defaults to \"GoogleMaps\")\r\n * @param opts Options to create the session (Defaults to satellite map type, English language, US region, and roadmap layer type)\r\n *\r\n * The following examples illustrates how a Google Maps base layer can be set on a viewport:\r\n * ```ts\r\n * [[include:GoogleMaps_BaseMapSimple]]\r\n * ```\r\n * ```ts\r\n * [[include:GoogleMaps_BaseMapOpts]]\r\n * ```\r\n * @beta\r\n */\r\n createBaseLayerSettings: (opts?: GoogleMapsCreateSessionOptions) => {\r\n return BaseMapLayerSettings.fromJSON(GoogleMapsUtils.createMapLayerProps(\"GoogleMaps\", opts));\r\n },\r\n\r\n /**\r\n * Read the session options from the map layer settings.\r\n * @param settings Map layer settings\r\n * ```\r\n * @beta\r\n */\r\n getMapLayerSessionOptions: (settings: ImageMapLayerSettings) => {\r\n return GoogleMapsUtils.getSessionOptionsFromMapLayer(settings);\r\n },\r\n};\r\n"]}
|
|
@@ -3,8 +3,16 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { ImageMapLayerSettings } from "@itwin/core-common";
|
|
5
5
|
import { ImageryMapLayerFormat, MapLayerImageryProvider } from "@itwin/core-frontend";
|
|
6
|
+
/**
|
|
7
|
+
* Google Maps imagery layer format.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
6
10
|
export declare class GoogleMapsMapLayerFormat extends ImageryMapLayerFormat {
|
|
11
|
+
/** Google Maps imagery layer format.
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
7
14
|
static formatId: string;
|
|
15
|
+
/** @internal */
|
|
8
16
|
static createImageryProvider(settings: ImageMapLayerSettings): MapLayerImageryProvider | undefined;
|
|
9
17
|
}
|
|
10
18
|
//# sourceMappingURL=GoogleMapsImageryFormat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleMapsImageryFormat.d.ts","sourceRoot":"","sources":["../../../src/GoogleMaps/GoogleMapsImageryFormat.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"GoogleMapsImageryFormat.d.ts","sourceRoot":"","sources":["../../../src/GoogleMaps/GoogleMapsImageryFormat.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAItF;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,qBAAqB;IACjE;;OAEG;IACH,OAAuB,QAAQ,SAAgB;IAE/C,gBAAgB;WACO,qBAAqB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,uBAAuB,GAAG,SAAS;CAGnH"}
|
|
@@ -7,10 +7,19 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { ImageryMapLayerFormat } from "@itwin/core-frontend";
|
|
9
9
|
import { GoogleMapsImageryProvider } from "./GoogleMapsImageryProvider.js";
|
|
10
|
+
import { MapLayersFormats } from "../mapLayersFormats.js";
|
|
11
|
+
/**
|
|
12
|
+
* Google Maps imagery layer format.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
10
15
|
export class GoogleMapsMapLayerFormat extends ImageryMapLayerFormat {
|
|
16
|
+
/** Google Maps imagery layer format.
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
11
19
|
static formatId = "GoogleMaps";
|
|
20
|
+
/** @internal */
|
|
12
21
|
static createImageryProvider(settings) {
|
|
13
|
-
return new GoogleMapsImageryProvider(settings);
|
|
22
|
+
return new GoogleMapsImageryProvider(settings, MapLayersFormats.googleMapsOpts?.sessionManager);
|
|
14
23
|
}
|
|
15
24
|
}
|
|
16
25
|
//# sourceMappingURL=GoogleMapsImageryFormat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleMapsImageryFormat.js","sourceRoot":"","sources":["../../../src/GoogleMaps/GoogleMapsImageryFormat.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,qBAAqB,EAA2B,MAAM,sBAAsB,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"GoogleMapsImageryFormat.js","sourceRoot":"","sources":["../../../src/GoogleMaps/GoogleMapsImageryFormat.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,qBAAqB,EAA2B,MAAM,sBAAsB,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;;GAGG;AACH,MAAM,OAAO,wBAAyB,SAAQ,qBAAqB;IACjE;;OAEG;IACI,MAAM,CAAU,QAAQ,GAAG,YAAY,CAAC;IAE/C,gBAAgB;IACT,MAAM,CAAU,qBAAqB,CAAC,QAA+B;QAC1E,OAAO,IAAI,yBAAyB,CAAC,QAAQ,EAAE,gBAAgB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IAClG,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 MapLayersFormats\r\n */\r\n\r\nimport { ImageMapLayerSettings } from \"@itwin/core-common\";\r\nimport { ImageryMapLayerFormat, MapLayerImageryProvider } from \"@itwin/core-frontend\";\r\nimport { GoogleMapsImageryProvider } from \"./GoogleMapsImageryProvider.js\";\r\nimport { MapLayersFormats } from \"../mapLayersFormats.js\";\r\n\r\n/**\r\n * Google Maps imagery layer format.\r\n * @public\r\n */\r\nexport class GoogleMapsMapLayerFormat extends ImageryMapLayerFormat {\r\n /** Google Maps imagery layer format.\r\n * @public\r\n */\r\n public static override formatId = \"GoogleMaps\";\r\n\r\n /** @internal */\r\n public static override createImageryProvider(settings: ImageMapLayerSettings): MapLayerImageryProvider | undefined {\r\n return new GoogleMapsImageryProvider(settings, MapLayersFormats.googleMapsOpts?.sessionManager);\r\n }\r\n}\r\n"]}
|
|
@@ -2,19 +2,22 @@
|
|
|
2
2
|
* @module MapLayersFormats
|
|
3
3
|
*/
|
|
4
4
|
import { ImageMapLayerSettings, ImageSource } from "@itwin/core-common";
|
|
5
|
-
import { DecorateContext,
|
|
6
|
-
import {
|
|
5
|
+
import { DecorateContext, MapCartoRectangle, MapLayerImageryProvider, ScreenViewport } from "@itwin/core-frontend";
|
|
6
|
+
import { GoogleMapsCreateSessionOptions, GoogleMapsSessionManager, ViewportInfo } from "./GoogleMapsSession.js";
|
|
7
7
|
export declare class GoogleMapsImageryProvider extends MapLayerImageryProvider {
|
|
8
8
|
private _decorator;
|
|
9
9
|
private _hadUnrecoverableError;
|
|
10
10
|
private _tileSize;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
private _sessionManager?;
|
|
12
|
+
private _sessionOptions;
|
|
13
|
+
private _activeSession?;
|
|
14
|
+
constructor(settings: ImageMapLayerSettings, sessionManager?: GoogleMapsSessionManager);
|
|
14
15
|
get tileSize(): number;
|
|
15
16
|
initialize(): Promise<void>;
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
protected getSessionManager(): Promise<GoogleMapsSessionManager>;
|
|
18
|
+
protected createCreateSessionOptions(settings: ImageMapLayerSettings): GoogleMapsCreateSessionOptions;
|
|
19
|
+
constructUrl(_row: number, _column: number, _level: number): Promise<string>;
|
|
20
|
+
fetchViewportInfo(rectangle: MapCartoRectangle, zoomLevel: number): Promise<ViewportInfo>;
|
|
18
21
|
private fetchAttributions;
|
|
19
22
|
private logJsonError;
|
|
20
23
|
loadTile(row: number, column: number, zoomLevel: number): Promise<ImageSource | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleMapsImageryProvider.d.ts","sourceRoot":"","sources":["../../../src/GoogleMaps/GoogleMapsImageryProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"GoogleMapsImageryProvider.d.ts","sourceRoot":"","sources":["../../../src/GoogleMaps/GoogleMapsImageryProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAkC,iBAAiB,EAAE,uBAAuB,EAAwB,cAAc,EAAQ,MAAM,sBAAsB,CAAC;AAC/K,OAAO,EAAE,8BAA8B,EAAuF,wBAAwB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAUrM,qBAAa,yBAA0B,SAAQ,uBAAuB;IAEpE,OAAO,CAAC,UAAU,CAAsB;IACxC,OAAO,CAAC,sBAAsB,CAAS;IACvC,OAAO,CAAC,SAAS,CAAO;IACxB,OAAO,CAAC,eAAe,CAAC,CAA2B;IACnD,OAAO,CAAC,eAAe,CAA2C;IAClE,OAAO,CAAC,cAAc,CAAC,CAAoB;gBAC/B,QAAQ,EAAE,qBAAqB,EAAE,cAAc,CAAC,EAAE,wBAAwB;IAMtF,IAAoB,QAAQ,IAAI,MAAM,CAA2B;IAE3C,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;cAajC,iBAAiB,IAAK,OAAO,CAAC,wBAAwB,CAAC;IAavE,SAAS,CAAC,0BAA0B,CAAC,QAAQ,EAAE,qBAAqB,GAAG,8BAA8B;IAoCxF,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAI5E,iBAAiB,CAAC,SAAS,EAAE,iBAAiB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