@itwin/map-layers-formats 4.6.0-dev.9 → 4.7.0-dev.3
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 +13 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts +15 -6
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js +64 -54
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.d.ts +7 -11
- package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.js +3 -19
- package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.d.ts +3 -3
- package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.js +3 -4
- package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.d.ts +3 -3
- package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.js +2 -3
- package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.d.ts +35 -15
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js +54 -48
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
- package/lib/cjs/ArcGisFeature/EsriSymbology.d.ts +2 -1
- package/lib/cjs/ArcGisFeature/EsriSymbology.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/EsriSymbology.js +2 -1
- package/lib/cjs/ArcGisFeature/EsriSymbology.js.map +1 -1
- package/lib/cjs/ArcGisFeature/esriPBuffer.gen.js +1 -1
- package/lib/cjs/ArcGisFeature/esriPBuffer.gen.js.map +1 -1
- package/lib/cjs/Feature/DefaultMarkerIcon.d.ts +10 -0
- package/lib/cjs/Feature/DefaultMarkerIcon.d.ts.map +1 -0
- package/lib/cjs/Feature/DefaultMarkerIcon.js +31 -0
- package/lib/cjs/Feature/DefaultMarkerIcon.js.map +1 -0
- package/lib/cjs/Feature/FeatureCanvasRenderer.d.ts +20 -0
- package/lib/cjs/Feature/FeatureCanvasRenderer.d.ts.map +1 -0
- package/lib/cjs/{ArcGisFeature/ArcGisCanvasRenderer.js → Feature/FeatureCanvasRenderer.js} +7 -6
- package/lib/cjs/Feature/FeatureCanvasRenderer.js.map +1 -0
- package/lib/cjs/Feature/FeatureInfoReader.d.ts +11 -0
- package/lib/cjs/Feature/FeatureInfoReader.d.ts.map +1 -0
- package/lib/cjs/Feature/FeatureInfoReader.js +35 -0
- package/lib/cjs/Feature/FeatureInfoReader.js.map +1 -0
- package/lib/cjs/Feature/FeatureSymbology.d.ts +8 -0
- package/lib/cjs/Feature/FeatureSymbology.d.ts.map +1 -0
- package/lib/cjs/Feature/FeatureSymbology.js +12 -0
- package/lib/cjs/Feature/FeatureSymbology.js.map +1 -0
- package/lib/cjs/Feature/RandomMapColor.d.ts +8 -0
- package/lib/cjs/Feature/RandomMapColor.d.ts.map +1 -0
- package/lib/cjs/Feature/RandomMapColor.js +29 -0
- package/lib/cjs/Feature/RandomMapColor.js.map +1 -0
- package/lib/cjs/GeoJSON/GeoJSONGeometry.d.ts +18 -0
- package/lib/cjs/GeoJSON/GeoJSONGeometry.d.ts.map +1 -0
- package/lib/cjs/GeoJSON/GeoJSONGeometry.js +11 -0
- package/lib/cjs/GeoJSON/GeoJSONGeometry.js.map +1 -0
- package/lib/cjs/GeoJSON/GeoJSONGeometryReader.d.ts +11 -0
- package/lib/cjs/GeoJSON/GeoJSONGeometryReader.d.ts.map +1 -0
- package/lib/cjs/GeoJSON/GeoJSONGeometryReader.js +83 -0
- package/lib/cjs/GeoJSON/GeoJSONGeometryReader.js.map +1 -0
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesFormat.d.ts +9 -0
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesFormat.d.ts.map +1 -0
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesFormat.js +94 -0
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesFormat.js.map +1 -0
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesProvider.d.ts +54 -0
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesProvider.d.ts.map +1 -0
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesProvider.js +477 -0
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesProvider.js.map +1 -0
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesReader.d.ts +23 -0
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesReader.d.ts.map +1 -0
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesReader.js +139 -0
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesReader.js.map +1 -0
- package/lib/cjs/Tools/GeometryTerrainDraper.d.ts +20 -0
- package/lib/cjs/Tools/GeometryTerrainDraper.d.ts.map +1 -0
- package/lib/cjs/Tools/GeometryTerrainDraper.js +153 -0
- package/lib/cjs/Tools/GeometryTerrainDraper.js.map +1 -0
- package/lib/cjs/Tools/MapFeatureInfoDecorator.d.ts +15 -10
- package/lib/cjs/Tools/MapFeatureInfoDecorator.d.ts.map +1 -1
- package/lib/cjs/Tools/MapFeatureInfoDecorator.js +191 -150
- package/lib/cjs/Tools/MapFeatureInfoDecorator.js.map +1 -1
- package/lib/cjs/Tools/MapFeatureInfoTool.d.ts.map +1 -1
- package/lib/cjs/Tools/MapFeatureInfoTool.js +7 -4
- package/lib/cjs/Tools/MapFeatureInfoTool.js.map +1 -1
- package/lib/cjs/mapLayersFormats.d.ts.map +1 -1
- package/lib/cjs/mapLayersFormats.js +5 -2
- package/lib/cjs/mapLayersFormats.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js +1 -2
- package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts +15 -6
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js +63 -55
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureReader.d.ts +7 -11
- package/lib/esm/ArcGisFeature/ArcGisFeatureReader.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js +3 -19
- package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.d.ts +3 -3
- package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.js +3 -4
- package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.d.ts +3 -3
- package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.js +2 -3
- package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.d.ts +35 -15
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js +52 -47
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
- package/lib/esm/ArcGisFeature/EsriSymbology.d.ts +2 -1
- package/lib/esm/ArcGisFeature/EsriSymbology.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/EsriSymbology.js +2 -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.d.ts +10 -0
- package/lib/esm/Feature/DefaultMarkerIcon.d.ts.map +1 -0
- package/lib/esm/Feature/DefaultMarkerIcon.js +27 -0
- package/lib/esm/Feature/DefaultMarkerIcon.js.map +1 -0
- package/lib/esm/Feature/FeatureCanvasRenderer.d.ts +20 -0
- package/lib/esm/Feature/FeatureCanvasRenderer.d.ts.map +1 -0
- package/lib/esm/{ArcGisFeature/ArcGisCanvasRenderer.js → Feature/FeatureCanvasRenderer.js} +6 -5
- package/lib/esm/Feature/FeatureCanvasRenderer.js.map +1 -0
- package/lib/esm/Feature/FeatureInfoReader.d.ts +11 -0
- package/lib/esm/Feature/FeatureInfoReader.d.ts.map +1 -0
- package/lib/esm/Feature/FeatureInfoReader.js +31 -0
- package/lib/esm/Feature/FeatureInfoReader.js.map +1 -0
- package/lib/esm/Feature/FeatureSymbology.d.ts +8 -0
- package/lib/esm/Feature/FeatureSymbology.d.ts.map +1 -0
- package/lib/esm/Feature/FeatureSymbology.js +8 -0
- package/lib/esm/Feature/FeatureSymbology.js.map +1 -0
- package/lib/esm/Feature/RandomMapColor.d.ts +8 -0
- package/lib/esm/Feature/RandomMapColor.d.ts.map +1 -0
- package/lib/esm/Feature/RandomMapColor.js +25 -0
- package/lib/esm/Feature/RandomMapColor.js.map +1 -0
- package/lib/esm/GeoJSON/GeoJSONGeometry.d.ts +18 -0
- package/lib/esm/GeoJSON/GeoJSONGeometry.d.ts.map +1 -0
- package/lib/esm/GeoJSON/GeoJSONGeometry.js +7 -0
- package/lib/esm/GeoJSON/GeoJSONGeometry.js.map +1 -0
- package/lib/esm/GeoJSON/GeoJSONGeometryReader.d.ts +11 -0
- package/lib/esm/GeoJSON/GeoJSONGeometryReader.d.ts.map +1 -0
- package/lib/esm/GeoJSON/GeoJSONGeometryReader.js +79 -0
- package/lib/esm/GeoJSON/GeoJSONGeometryReader.js.map +1 -0
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesFormat.d.ts +9 -0
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesFormat.d.ts.map +1 -0
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesFormat.js +90 -0
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesFormat.js.map +1 -0
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesProvider.d.ts +54 -0
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesProvider.d.ts.map +1 -0
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesProvider.js +472 -0
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesProvider.js.map +1 -0
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesReader.d.ts +23 -0
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesReader.d.ts.map +1 -0
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesReader.js +135 -0
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesReader.js.map +1 -0
- package/lib/esm/Tools/GeometryTerrainDraper.d.ts +20 -0
- package/lib/esm/Tools/GeometryTerrainDraper.d.ts.map +1 -0
- package/lib/esm/Tools/GeometryTerrainDraper.js +149 -0
- package/lib/esm/Tools/GeometryTerrainDraper.js.map +1 -0
- package/lib/esm/Tools/MapFeatureInfoDecorator.d.ts +15 -10
- package/lib/esm/Tools/MapFeatureInfoDecorator.d.ts.map +1 -1
- package/lib/esm/Tools/MapFeatureInfoDecorator.js +193 -152
- package/lib/esm/Tools/MapFeatureInfoDecorator.js.map +1 -1
- package/lib/esm/Tools/MapFeatureInfoTool.d.ts.map +1 -1
- package/lib/esm/Tools/MapFeatureInfoTool.js +7 -5
- package/lib/esm/Tools/MapFeatureInfoTool.js.map +1 -1
- package/lib/esm/mapLayersFormats.d.ts.map +1 -1
- package/lib/esm/mapLayersFormats.js +5 -3
- package/lib/esm/mapLayersFormats.js.map +1 -1
- package/package.json +18 -15
- package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.d.ts +0 -19
- package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.d.ts.map +0 -1
- package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.js.map +0 -1
- package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.d.ts +0 -19
- package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.d.ts.map +0 -1
- package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EsriSymbology.d.ts","sourceRoot":"","sources":["../../../src/ArcGisFeature/EsriSymbology.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"EsriSymbology.d.ts","sourceRoot":"","sources":["../../../src/ArcGisFeature/EsriSymbology.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAa/D,gBAAgB;AAChB,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,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,EAAE,4BAA4B;CAGnE;AAED,gBAAgB;AAChB,qBAAa,uBAAwB,SAAQ,YAAY;IACvD,OAAO,CAAC,MAAM,CAA+B;IAC7C,SAAgB,IAAI,EAAE,gBAAgB,CAAiB;IACvD,SAAgB,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3C,IAAW,oBAAoB,iCAA6C;IAC5E,SAAgB,eAAe,EAAE,wBAAwB,EAAE,CAAM;IAEjE,IAAoB,MAAM,yBAKzB;IAED,IAAW,KAAK,WAA6C;IAC7D,IAAW,QAAQ,WAAwC;IAE3D,SAAS,aAAa,IAAI,EAAE,4BAA4B;IAYlC,UAAU;WAaT,QAAQ,CAAC,IAAI,EAAE,4BAA4B;CAGnE"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { assert } from "@itwin/core-bentley";
|
|
6
6
|
import { ColorDef } from "@itwin/core-common";
|
|
7
|
+
import { FeatureSymbology } from "../Feature/FeatureSymbology";
|
|
7
8
|
/** Convert a channel array [r, g, b, a] to ColorDef
|
|
8
9
|
* @internal
|
|
9
10
|
*/
|
|
@@ -15,7 +16,7 @@ function colorFromArray(channels) {
|
|
|
15
16
|
return undefined;
|
|
16
17
|
}
|
|
17
18
|
/** @internal */
|
|
18
|
-
export class EsriSymbol {
|
|
19
|
+
export class EsriSymbol extends FeatureSymbology {
|
|
19
20
|
static fromJSON(props) {
|
|
20
21
|
if (props.type === "esriSFS") {
|
|
21
22
|
return EsriSFS.fromJSON(props);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EsriSymbology.js","sourceRoot":"","sources":["../../../src/ArcGisFeature/EsriSymbology.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;GAEG;AACH,SAAS,cAAc,CAAC,QAAmB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AS,EAAE,CAAC,CAAC;aACpD;SACF;QACD,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;IAEM,MAAM,CAAU,QAAQ,CAAC,IAAkC;QAChE,OAAO,IAAI,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAC3C,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 { assert } from \"@itwin/core-bentley\";\r\nimport { ColorDef } from \"@itwin/core-common\";\r\n\r\n/** Convert a channel array [r, g, b, a] to ColorDef\r\n * @internal\r\n */\r\nfunction colorFromArray(channels?: number[]) {\r\n if (channels && channels.length === 4) {\r\n // Alpha channel is reversed, 255 = opaque\r\n return ColorDef.from(channels[0], channels[1], channels[2], 255 - channels[3]);\r\n }\r\n return undefined;\r\n}\r\n\r\n/** @internal */\r\nexport type EsriSymbolPropsType = \"esriSFS\" | \"esriPMS\" | \"esriSMS\" | \"esriSLS\" | \"esriSMS\" | \"esriTS\" | \"CIMSymbolReference\";\r\n\r\n/** @internal */\r\nexport interface EsriSymbolCommonProps {\r\n type: EsriSymbolPropsType;\r\n}\r\n\r\n/** @internal */\r\nexport type EsriSymbolProps = EsriSLSProps | EsriPMSProps | EsriSFSProps | EsriSMSProps;\r\n\r\n/** @internal */\r\nexport abstract class EsriSymbol implements EsriSymbolCommonProps {\r\n public readonly abstract type: EsriSymbolPropsType;\r\n\r\n public static fromJSON(props: EsriSymbolProps) {\r\n if (props.type === \"esriSFS\") {\r\n return EsriSFS.fromJSON(props );\r\n } else if (props.type === \"esriSLS\") {\r\n return EsriSLS.fromJSON(props );\r\n } else if (props.type === \"esriPMS\") {\r\n return EsriPMS.fromJSON(props );\r\n } else if (props.type === \"esriSMS\") {\r\n return EsriSMS.fromJSON(props );\r\n }\r\n throw new Error(`Unknown ESRI symbology type}`);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport type EsriSLSStyle = \"esriSLSDash\" | \"esriSLSDashDot\" | \"esriSLSDashDotDot\" | \"esriSLSDot\" | \"esriSLSLongDash\" | \"esriSLSLongDashDot\" |\r\n\"esriSLSNull\" | \"esriSLSShortDash\" | \"esriSLSShortDashDot\" | \"esriSLSShortDashDotDot\" | \"esriSLSShortDot\" | \"esriSLSSolid\";\r\n\r\n/** @internal */\r\nexport interface EsriSLSProps extends EsriSymbolCommonProps {\r\n color: number[];\r\n type: \"esriSLS\";\r\n width: number;\r\n style: EsriSLSStyle;\r\n}\r\n\r\n/** @internal */\r\nexport class EsriSLS implements EsriSymbolCommonProps {\r\n public readonly props: EsriSLSProps;\r\n\r\n public get color() { return colorFromArray(this.props.color); }\r\n public get type() { return this.props.type; }\r\n public get width() { return this.props.width; }\r\n public get style() { return this.props.style; }\r\n\r\n constructor(json: EsriSLSProps) {\r\n this.props = json;\r\n }\r\n\r\n public static fromJSON(json: EsriSLSProps) {\r\n return new EsriSLS(json);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport interface EsriPMSProps extends EsriSymbolCommonProps {\r\n type: \"esriPMS\";\r\n url: string;\r\n imageData: string;\r\n contentType: string;\r\n width?: number;\r\n height?: number;\r\n xoffset?: number;\r\n yoffset?: number;\r\n angle?: number;\r\n}\r\n\r\n/** @internal */\r\nexport class EsriPMS implements EsriSymbolCommonProps {\r\n public readonly props: EsriPMSProps;\r\n private _image: HTMLImageElement|undefined;\r\n\r\n public get type() { return this.props.type; }\r\n public get url() { return this.props.url; }\r\n public get imageData() { return this.props.imageData; }\r\n public get imageUrl() { return `data:${this.contentType};base64,${this.imageData}`; }\r\n public get image() {\r\n assert(this._image !== undefined);\r\n return this._image;\r\n }\r\n public get contentType() { return this.props.contentType; }\r\n public get width() { return this.props.width; }\r\n public get height() { return this.props.height; }\r\n public get xoffset() { return this.props.xoffset; }\r\n public get yoffset() { return this.props.yoffset; }\r\n public get angle() { return this.props.angle; }\r\n\r\n public async loadImage() {\r\n if (this._image === undefined) {\r\n this._image = new Image();\r\n\r\n return new Promise<void>((resolve, reject) => {\r\n if (this._image) {\r\n this._image.addEventListener(\"load\", () => {\r\n resolve();\r\n });\r\n this._image.src = this.imageUrl;\r\n } else\r\n reject(new Error(\"Failed to load image\"));\r\n });\r\n }\r\n }\r\n\r\n private constructor(json: EsriPMSProps) {\r\n this.props = json;\r\n }\r\n\r\n public static fromJSON(json: EsriPMSProps) {\r\n return new EsriPMS(json);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport type EsriSMSStyleType = \"esriSMSCircle\" | \"esriSMSCross\" | \"esriSMSDiamond\" | \"esriSMSSquare\" | \"esriSMSTriangle\" | \"esriSMSX\";\r\n\r\n/** @internal */\r\nexport interface EsriSMSProps extends EsriSymbolCommonProps {\r\n angle?: number;\r\n color?: number[];\r\n outline?: EsriSLSProps;\r\n size: number;\r\n style: EsriSMSStyleType;\r\n type: \"esriSMS\";\r\n xoffset?: number;\r\n yoffset?: number;\r\n}\r\n\r\n/** @internal */\r\nexport class EsriSMS implements EsriSymbolCommonProps {\r\n public readonly props: EsriSMSProps;\r\n private _outline: EsriSLS | undefined;\r\n public get angle() { return this.props.angle; }\r\n public get color() { return colorFromArray(this.props.color); }\r\n public get outline() { return this._outline; }\r\n public get size() { return this.props.size; }\r\n public get style() { return this.props.style; }\r\n public get type() { return this.props.type; }\r\n public get xoffset() { return this.props.xoffset; }\r\n public get yoffset() { return this.props.yoffset; }\r\n\r\n private constructor(json: EsriSMSProps) {\r\n this.props = json;\r\n if (json.outline)\r\n this._outline = EsriSLS.fromJSON(json.outline);\r\n }\r\n\r\n public static fromJSON(json: EsriSMSProps) {\r\n return new EsriSMS(json);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport type EsriSFSStyleProps = \"esriSFSBackwardDiagonal\" | \"esriSFSCross\" | \"esriSFSDiagonalCross\" | \"esriSFSForwardDiagonal\" | \"esriSFSHorizontal\" | \"esriSFSNull\" | \"esriSFSSolid\" | \"esriSFSVertical\";\r\n\r\n/** @internal */\r\nexport interface EsriSFSProps extends EsriSymbolCommonProps {\r\n color?: number[];\r\n type: \"esriSFS\";\r\n style: EsriSFSStyleProps;\r\n outline?: EsriSLSProps;\r\n}\r\n\r\n/** @internal */\r\nexport class EsriSFS implements EsriSymbolCommonProps {\r\n public readonly props: EsriSFSProps;\r\n private _outline: EsriSLS | undefined;\r\n\r\n public get color() { return colorFromArray(this.props.color); }\r\n public get type() { return this.props.type; }\r\n public get style() { return this.props.style; }\r\n public get outline() { return this._outline; }\r\n constructor(json: EsriSFSProps) {\r\n this.props = json;\r\n if (json.outline)\r\n this._outline = EsriSLS.fromJSON(json.outline);\r\n }\r\n\r\n public static fromJSON(json: EsriSFSProps): EsriSFS {\r\n return new EsriSFS(json);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport interface EsriUniqueValueInfoProps {\r\n value: string;\r\n label?: string;\r\n description?: string;\r\n symbol: EsriSymbolProps;\r\n}\r\n\r\n/** @internal */\r\nexport class EsriUniqueValueInfo {\r\n\r\n public readonly value: string;\r\n public readonly label: string|undefined;\r\n public readonly description: string|undefined;\r\n public readonly symbol: EsriSymbol;\r\n\r\n private constructor(json: EsriUniqueValueInfoProps) {\r\n this.value = json.value;\r\n this.label = json.label;\r\n this.description = json.description;\r\n this.symbol = EsriSymbol.fromJSON(json.symbol);\r\n }\r\n\r\n public static fromJSON(json: EsriUniqueValueInfoProps) {\r\n return new EsriUniqueValueInfo(json);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport interface EsriClassBreaksInfoProps {\r\n classMaxValue: number;\r\n classMinValue?: number;\r\n label?: string;\r\n description?: string;\r\n symbol: EsriSymbolProps;\r\n}\r\n\r\n/** @internal */\r\nexport class EsriClassBreaksValueInfo {\r\n\r\n public readonly classMaxValue: number;\r\n public readonly classMinValue?: number;\r\n public readonly label: string|undefined;\r\n public readonly description: string|undefined;\r\n public readonly symbol: EsriSymbol;\r\n\r\n private constructor(json: EsriClassBreaksInfoProps) {\r\n this.classMaxValue = json.classMaxValue;\r\n this.classMinValue = json.classMinValue;\r\n this.label = json.label;\r\n this.description = json.description;\r\n this.symbol = EsriSymbol.fromJSON(json.symbol);\r\n }\r\n\r\n public static fromJSON(json: EsriClassBreaksInfoProps) {\r\n return new EsriClassBreaksValueInfo(json);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport interface EsriRendererBaseProps {\r\n type: EsriRendererType;\r\n}\r\n\r\n/** @internal */\r\nexport interface EsriSimpleRendererProps extends EsriRendererBaseProps {\r\n symbol: EsriSymbolProps;\r\n}\r\n\r\n/** @internal */\r\nexport interface EsriUniqueValueRendererProps extends EsriRendererBaseProps {\r\n field1?: string;\r\n field2?: string;\r\n field3?: string;\r\n defaultSymbol?: EsriSymbolProps;\r\n uniqueValueInfos: EsriUniqueValueInfoProps[];\r\n}\r\n\r\n/** @internal */\r\nexport type EsriClassificationMethodType = \"esriClassifyDefinedInterval\" | \"esriClassifyEqualInterval\" | \"esriClassifyManual\" | \"esriClassifyNaturalBreaks\" | \"esriClassifyQuantile\" | \"esriClassifyStandardDeviation\";\r\n\r\n/** @internal */\r\nexport interface EsriClassBreaksRendererProps extends EsriRendererBaseProps {\r\n field: string;\r\n minValue: number;\r\n defaultSymbol?: EsriSymbolProps;\r\n classificationMethod: EsriClassificationMethodType;\r\n classBreakInfos: EsriClassBreaksInfoProps[];\r\n}\r\n\r\n/** @internal */\r\nexport type EsriRendererType = \"simple\" | \"uniqueValue\" | \"classBreaks\";\r\n\r\n/** @internal */\r\nexport type EsriRendererProps = EsriSimpleRendererProps | EsriUniqueValueRendererProps | EsriClassBreaksRendererProps;\r\n\r\n/** @internal */\r\nexport abstract class EsriRenderer {\r\n public readonly abstract type: EsriRendererType;\r\n public abstract initialize(): Promise<void>;\r\n public get fields(): string[]|undefined {return undefined;}\r\n public static fromJSON(json: EsriRendererProps): EsriRenderer {\r\n if (json.type === \"simple\")\r\n return EsriSimpleRenderer.fromJSON(json as EsriSimpleRendererProps);\r\n else if (json.type === \"uniqueValue\")\r\n return EsriUniqueValueRenderer.fromJSON(json as EsriUniqueValueRendererProps);\r\n else if (json.type === \"classBreaks\")\r\n return EsriClassBreaksRenderer.fromJSON(json as EsriClassBreaksRendererProps);\r\n else\r\n throw Error(\"Unknown renderer type\");\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class EsriSimpleRenderer extends EsriRenderer {\r\n public readonly type: EsriRendererType = \"simple\";\r\n public readonly symbol: EsriSymbol;\r\n\r\n protected constructor(json: EsriSimpleRendererProps) {\r\n super();\r\n this.type = json.type;\r\n this.symbol = EsriSymbol.fromJSON(json.symbol);\r\n }\r\n public async initialize() {\r\n const promises: Promise<void>[] = [];\r\n if (this.symbol.type === \"esriPMS\") {\r\n promises.push((this.symbol as EsriPMS).loadImage());\r\n }\r\n await Promise.all(promises);\r\n }\r\n\r\n public static override fromJSON(json: EsriSimpleRendererProps) {\r\n return new EsriSimpleRenderer(json);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class EsriUniqueValueRenderer extends EsriRenderer {\r\n private _props: EsriUniqueValueRendererProps;\r\n public readonly type: EsriRendererType = \"uniqueValue\";\r\n public readonly defaultSymbol?: EsriSymbol;\r\n public readonly uniqueValueInfos: EsriUniqueValueInfo[] = [];\r\n\r\n public override get fields() {\r\n const fields: string[] = [];\r\n if (this.field1)\r\n fields.push(this.field1);\r\n if (this.field2)\r\n fields.push(this.field2);\r\n if (this.field3)\r\n fields.push(this.field3);\r\n\r\n return fields;\r\n }\r\n\r\n public get field1() { return this._props.field1 ?? undefined; }\r\n public get field2() { return this._props.field2 ?? undefined; }\r\n public get field3() { return this._props.field3 ?? undefined; }\r\n\r\n protected constructor(json: EsriUniqueValueRendererProps) {\r\n super();\r\n if (json.defaultSymbol)\r\n this.defaultSymbol = EsriSymbol.fromJSON(json.defaultSymbol);\r\n for (const uvi of json.uniqueValueInfos) {\r\n this.uniqueValueInfos.push(EsriUniqueValueInfo.fromJSON(uvi));\r\n }\r\n\r\n this._props = json;\r\n }\r\n\r\n public override async initialize() {\r\n const promises: Promise<void>[] = [];\r\n if (this.defaultSymbol?.type === \"esriPMS\") {\r\n promises.push((this.defaultSymbol as EsriPMS).loadImage());\r\n }\r\n for (const uvi of this.uniqueValueInfos) {\r\n if (uvi.symbol.type === \"esriPMS\") {\r\n promises.push((uvi.symbol as EsriPMS).loadImage());\r\n }\r\n }\r\n await Promise.all(promises);\r\n }\r\n\r\n public static override fromJSON(json: EsriUniqueValueRendererProps) {\r\n return new EsriUniqueValueRenderer(json);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class EsriClassBreaksRenderer extends EsriRenderer {\r\n private _props: EsriClassBreaksRendererProps;\r\n public readonly type: EsriRendererType = \"classBreaks\";\r\n public readonly defaultSymbol?: EsriSymbol;\r\n public get classificationMethod() {return this._props.classificationMethod;}\r\n public readonly classBreakInfos: EsriClassBreaksValueInfo[] = [];\r\n\r\n public override get fields() {\r\n if (this.field)\r\n return [this.field];\r\n\r\n return undefined;\r\n }\r\n\r\n public get field() { return this._props.field ?? undefined; }\r\n public get minValue() { return this._props.minValue ?? 0; }\r\n\r\n protected constructor(json: EsriClassBreaksRendererProps) {\r\n super();\r\n if (json.defaultSymbol)\r\n this.defaultSymbol = EsriSymbol.fromJSON(json.defaultSymbol);\r\n\r\n for (const cbi of json.classBreakInfos) {\r\n this.classBreakInfos.push(EsriClassBreaksValueInfo.fromJSON(cbi));\r\n }\r\n\r\n this._props = json;\r\n }\r\n\r\n public override async initialize() {\r\n const promises: Promise<void>[] = [];\r\n if (this.defaultSymbol?.type === \"esriPMS\") {\r\n promises.push((this.defaultSymbol as EsriPMS).loadImage());\r\n }\r\n for (const cbi of this.classBreakInfos) {\r\n if (cbi.symbol.type === \"esriPMS\") {\r\n promises.push((cbi.symbol as EsriPMS).loadImage());\r\n }\r\n }\r\n await Promise.all(promises);\r\n }\r\n\r\n public static override fromJSON(json: EsriClassBreaksRendererProps) {\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AAI,CAAC,eAAe,CAAC,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QACpE,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACrB,CAAC;IAEe,KAAK,CAAC,UAAU;QAC9B,MAAM,QAAQ,GAAoB,EAAE,CAAC;QACrC,IAAI,IAAI,CAAC,aAAa,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAC3C,QAAQ,CAAC,IAAI,CAAE,IAAI,CAAC,aAAyB,CAAC,SAAS,EAAE,CAAC,CAAC;QAC7D,CAAC;QACD,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACvC,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;gBAClC,QAAQ,CAAC,IAAI,CAAE,GAAG,CAAC,MAAkB,CAAC,SAAS,EAAE,CAAC,CAAC;YACrD,CAAC;QACH,CAAC;QACD,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;IAEM,MAAM,CAAU,QAAQ,CAAC,IAAkC;QAChE,OAAO,IAAI,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAC3C,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 { assert } from \"@itwin/core-bentley\";\r\nimport { ColorDef } from \"@itwin/core-common\";\r\nimport { FeatureSymbology } from \"../Feature/FeatureSymbology\";\r\n\r\n/** Convert a channel array [r, g, b, a] to ColorDef\r\n * @internal\r\n */\r\nfunction colorFromArray(channels?: number[]) {\r\n if (channels && channels.length === 4) {\r\n // Alpha channel is reversed, 255 = opaque\r\n return ColorDef.from(channels[0], channels[1], channels[2], 255 - channels[3]);\r\n }\r\n return undefined;\r\n}\r\n\r\n/** @internal */\r\nexport type EsriSymbolPropsType = \"esriSFS\" | \"esriPMS\" | \"esriSMS\" | \"esriSLS\" | \"esriSMS\" | \"esriTS\" | \"CIMSymbolReference\";\r\n\r\n/** @internal */\r\nexport interface EsriSymbolCommonProps {\r\n type: EsriSymbolPropsType;\r\n}\r\n\r\n/** @internal */\r\nexport type EsriSymbolProps = EsriSLSProps | EsriPMSProps | EsriSFSProps | EsriSMSProps;\r\n\r\n/** @internal */\r\nexport abstract class EsriSymbol extends FeatureSymbology implements EsriSymbolCommonProps {\r\n public readonly abstract type: EsriSymbolPropsType;\r\n\r\n public static fromJSON(props: EsriSymbolProps) {\r\n if (props.type === \"esriSFS\") {\r\n return EsriSFS.fromJSON(props );\r\n } else if (props.type === \"esriSLS\") {\r\n return EsriSLS.fromJSON(props );\r\n } else if (props.type === \"esriPMS\") {\r\n return EsriPMS.fromJSON(props );\r\n } else if (props.type === \"esriSMS\") {\r\n return EsriSMS.fromJSON(props );\r\n }\r\n throw new Error(`Unknown ESRI symbology type}`);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport type EsriSLSStyle = \"esriSLSDash\" | \"esriSLSDashDot\" | \"esriSLSDashDotDot\" | \"esriSLSDot\" | \"esriSLSLongDash\" | \"esriSLSLongDashDot\" |\r\n\"esriSLSNull\" | \"esriSLSShortDash\" | \"esriSLSShortDashDot\" | \"esriSLSShortDashDotDot\" | \"esriSLSShortDot\" | \"esriSLSSolid\";\r\n\r\n/** @internal */\r\nexport interface EsriSLSProps extends EsriSymbolCommonProps {\r\n color: number[];\r\n type: \"esriSLS\";\r\n width: number;\r\n style: EsriSLSStyle;\r\n}\r\n\r\n/** @internal */\r\nexport class EsriSLS implements EsriSymbolCommonProps {\r\n public readonly props: EsriSLSProps;\r\n\r\n public get color() { return colorFromArray(this.props.color); }\r\n public get type() { return this.props.type; }\r\n public get width() { return this.props.width; }\r\n public get style() { return this.props.style; }\r\n\r\n constructor(json: EsriSLSProps) {\r\n this.props = json;\r\n }\r\n\r\n public static fromJSON(json: EsriSLSProps) {\r\n return new EsriSLS(json);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport interface EsriPMSProps extends EsriSymbolCommonProps {\r\n type: \"esriPMS\";\r\n url: string;\r\n imageData: string;\r\n contentType: string;\r\n width?: number;\r\n height?: number;\r\n xoffset?: number;\r\n yoffset?: number;\r\n angle?: number;\r\n}\r\n\r\n/** @internal */\r\nexport class EsriPMS implements EsriSymbolCommonProps {\r\n public readonly props: EsriPMSProps;\r\n private _image: HTMLImageElement|undefined;\r\n\r\n public get type() { return this.props.type; }\r\n public get url() { return this.props.url; }\r\n public get imageData() { return this.props.imageData; }\r\n public get imageUrl() { return `data:${this.contentType};base64,${this.imageData}`; }\r\n public get image() {\r\n assert(this._image !== undefined);\r\n return this._image;\r\n }\r\n public get contentType() { return this.props.contentType; }\r\n public get width() { return this.props.width; }\r\n public get height() { return this.props.height; }\r\n public get xoffset() { return this.props.xoffset; }\r\n public get yoffset() { return this.props.yoffset; }\r\n public get angle() { return this.props.angle; }\r\n\r\n public async loadImage() {\r\n if (this._image === undefined) {\r\n this._image = new Image();\r\n\r\n return new Promise<void>((resolve, reject) => {\r\n if (this._image) {\r\n this._image.addEventListener(\"load\", () => {\r\n resolve();\r\n });\r\n this._image.src = this.imageUrl;\r\n } else\r\n reject(new Error(\"Failed to load image\"));\r\n });\r\n }\r\n }\r\n\r\n private constructor(json: EsriPMSProps) {\r\n this.props = json;\r\n }\r\n\r\n public static fromJSON(json: EsriPMSProps) {\r\n return new EsriPMS(json);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport type EsriSMSStyleType = \"esriSMSCircle\" | \"esriSMSCross\" | \"esriSMSDiamond\" | \"esriSMSSquare\" | \"esriSMSTriangle\" | \"esriSMSX\";\r\n\r\n/** @internal */\r\nexport interface EsriSMSProps extends EsriSymbolCommonProps {\r\n angle?: number;\r\n color?: number[];\r\n outline?: EsriSLSProps;\r\n size: number;\r\n style: EsriSMSStyleType;\r\n type: \"esriSMS\";\r\n xoffset?: number;\r\n yoffset?: number;\r\n}\r\n\r\n/** @internal */\r\nexport class EsriSMS implements EsriSymbolCommonProps {\r\n public readonly props: EsriSMSProps;\r\n private _outline: EsriSLS | undefined;\r\n public get angle() { return this.props.angle; }\r\n public get color() { return colorFromArray(this.props.color); }\r\n public get outline() { return this._outline; }\r\n public get size() { return this.props.size; }\r\n public get style() { return this.props.style; }\r\n public get type() { return this.props.type; }\r\n public get xoffset() { return this.props.xoffset; }\r\n public get yoffset() { return this.props.yoffset; }\r\n\r\n private constructor(json: EsriSMSProps) {\r\n this.props = json;\r\n if (json.outline)\r\n this._outline = EsriSLS.fromJSON(json.outline);\r\n }\r\n\r\n public static fromJSON(json: EsriSMSProps) {\r\n return new EsriSMS(json);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport type EsriSFSStyleProps = \"esriSFSBackwardDiagonal\" | \"esriSFSCross\" | \"esriSFSDiagonalCross\" | \"esriSFSForwardDiagonal\" | \"esriSFSHorizontal\" | \"esriSFSNull\" | \"esriSFSSolid\" | \"esriSFSVertical\";\r\n\r\n/** @internal */\r\nexport interface EsriSFSProps extends EsriSymbolCommonProps {\r\n color?: number[];\r\n type: \"esriSFS\";\r\n style: EsriSFSStyleProps;\r\n outline?: EsriSLSProps;\r\n}\r\n\r\n/** @internal */\r\nexport class EsriSFS implements EsriSymbolCommonProps {\r\n public readonly props: EsriSFSProps;\r\n private _outline: EsriSLS | undefined;\r\n\r\n public get color() { return colorFromArray(this.props.color); }\r\n public get type() { return this.props.type; }\r\n public get style() { return this.props.style; }\r\n public get outline() { return this._outline; }\r\n constructor(json: EsriSFSProps) {\r\n this.props = json;\r\n if (json.outline)\r\n this._outline = EsriSLS.fromJSON(json.outline);\r\n }\r\n\r\n public static fromJSON(json: EsriSFSProps): EsriSFS {\r\n return new EsriSFS(json);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport interface EsriUniqueValueInfoProps {\r\n value: string;\r\n label?: string;\r\n description?: string;\r\n symbol: EsriSymbolProps;\r\n}\r\n\r\n/** @internal */\r\nexport class EsriUniqueValueInfo {\r\n\r\n public readonly value: string;\r\n public readonly label: string|undefined;\r\n public readonly description: string|undefined;\r\n public readonly symbol: EsriSymbol;\r\n\r\n private constructor(json: EsriUniqueValueInfoProps) {\r\n this.value = json.value;\r\n this.label = json.label;\r\n this.description = json.description;\r\n this.symbol = EsriSymbol.fromJSON(json.symbol);\r\n }\r\n\r\n public static fromJSON(json: EsriUniqueValueInfoProps) {\r\n return new EsriUniqueValueInfo(json);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport interface EsriClassBreaksInfoProps {\r\n classMaxValue: number;\r\n classMinValue?: number;\r\n label?: string;\r\n description?: string;\r\n symbol: EsriSymbolProps;\r\n}\r\n\r\n/** @internal */\r\nexport class EsriClassBreaksValueInfo {\r\n\r\n public readonly classMaxValue: number;\r\n public readonly classMinValue?: number;\r\n public readonly label: string|undefined;\r\n public readonly description: string|undefined;\r\n public readonly symbol: EsriSymbol;\r\n\r\n private constructor(json: EsriClassBreaksInfoProps) {\r\n this.classMaxValue = json.classMaxValue;\r\n this.classMinValue = json.classMinValue;\r\n this.label = json.label;\r\n this.description = json.description;\r\n this.symbol = EsriSymbol.fromJSON(json.symbol);\r\n }\r\n\r\n public static fromJSON(json: EsriClassBreaksInfoProps) {\r\n return new EsriClassBreaksValueInfo(json);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport interface EsriRendererBaseProps {\r\n type: EsriRendererType;\r\n}\r\n\r\n/** @internal */\r\nexport interface EsriSimpleRendererProps extends EsriRendererBaseProps {\r\n symbol: EsriSymbolProps;\r\n}\r\n\r\n/** @internal */\r\nexport interface EsriUniqueValueRendererProps extends EsriRendererBaseProps {\r\n field1?: string;\r\n field2?: string;\r\n field3?: string;\r\n defaultSymbol?: EsriSymbolProps;\r\n uniqueValueInfos: EsriUniqueValueInfoProps[];\r\n}\r\n\r\n/** @internal */\r\nexport type EsriClassificationMethodType = \"esriClassifyDefinedInterval\" | \"esriClassifyEqualInterval\" | \"esriClassifyManual\" | \"esriClassifyNaturalBreaks\" | \"esriClassifyQuantile\" | \"esriClassifyStandardDeviation\";\r\n\r\n/** @internal */\r\nexport interface EsriClassBreaksRendererProps extends EsriRendererBaseProps {\r\n field: string;\r\n minValue: number;\r\n defaultSymbol?: EsriSymbolProps;\r\n classificationMethod: EsriClassificationMethodType;\r\n classBreakInfos: EsriClassBreaksInfoProps[];\r\n}\r\n\r\n/** @internal */\r\nexport type EsriRendererType = \"simple\" | \"uniqueValue\" | \"classBreaks\";\r\n\r\n/** @internal */\r\nexport type EsriRendererProps = EsriSimpleRendererProps | EsriUniqueValueRendererProps | EsriClassBreaksRendererProps;\r\n\r\n/** @internal */\r\nexport abstract class EsriRenderer {\r\n public readonly abstract type: EsriRendererType;\r\n public abstract initialize(): Promise<void>;\r\n public get fields(): string[]|undefined {return undefined;}\r\n public static fromJSON(json: EsriRendererProps): EsriRenderer {\r\n if (json.type === \"simple\")\r\n return EsriSimpleRenderer.fromJSON(json as EsriSimpleRendererProps);\r\n else if (json.type === \"uniqueValue\")\r\n return EsriUniqueValueRenderer.fromJSON(json as EsriUniqueValueRendererProps);\r\n else if (json.type === \"classBreaks\")\r\n return EsriClassBreaksRenderer.fromJSON(json as EsriClassBreaksRendererProps);\r\n else\r\n throw Error(\"Unknown renderer type\");\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class EsriSimpleRenderer extends EsriRenderer {\r\n public readonly type: EsriRendererType = \"simple\";\r\n public readonly symbol: EsriSymbol;\r\n\r\n protected constructor(json: EsriSimpleRendererProps) {\r\n super();\r\n this.type = json.type;\r\n this.symbol = EsriSymbol.fromJSON(json.symbol);\r\n }\r\n public async initialize() {\r\n const promises: Promise<void>[] = [];\r\n if (this.symbol.type === \"esriPMS\") {\r\n promises.push((this.symbol as EsriPMS).loadImage());\r\n }\r\n await Promise.all(promises);\r\n }\r\n\r\n public static override fromJSON(json: EsriSimpleRendererProps) {\r\n return new EsriSimpleRenderer(json);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class EsriUniqueValueRenderer extends EsriRenderer {\r\n private _props: EsriUniqueValueRendererProps;\r\n public readonly type: EsriRendererType = \"uniqueValue\";\r\n public readonly defaultSymbol?: EsriSymbol;\r\n public readonly uniqueValueInfos: EsriUniqueValueInfo[] = [];\r\n\r\n public override get fields() {\r\n const fields: string[] = [];\r\n if (this.field1)\r\n fields.push(this.field1);\r\n if (this.field2)\r\n fields.push(this.field2);\r\n if (this.field3)\r\n fields.push(this.field3);\r\n\r\n return fields;\r\n }\r\n\r\n public get field1() { return this._props.field1 ?? undefined; }\r\n public get field2() { return this._props.field2 ?? undefined; }\r\n public get field3() { return this._props.field3 ?? undefined; }\r\n\r\n protected constructor(json: EsriUniqueValueRendererProps) {\r\n super();\r\n if (json.defaultSymbol)\r\n this.defaultSymbol = EsriSymbol.fromJSON(json.defaultSymbol);\r\n for (const uvi of json.uniqueValueInfos) {\r\n this.uniqueValueInfos.push(EsriUniqueValueInfo.fromJSON(uvi));\r\n }\r\n\r\n this._props = json;\r\n }\r\n\r\n public override async initialize() {\r\n const promises: Promise<void>[] = [];\r\n if (this.defaultSymbol?.type === \"esriPMS\") {\r\n promises.push((this.defaultSymbol as EsriPMS).loadImage());\r\n }\r\n for (const uvi of this.uniqueValueInfos) {\r\n if (uvi.symbol.type === \"esriPMS\") {\r\n promises.push((uvi.symbol as EsriPMS).loadImage());\r\n }\r\n }\r\n await Promise.all(promises);\r\n }\r\n\r\n public static override fromJSON(json: EsriUniqueValueRendererProps) {\r\n return new EsriUniqueValueRenderer(json);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class EsriClassBreaksRenderer extends EsriRenderer {\r\n private _props: EsriClassBreaksRendererProps;\r\n public readonly type: EsriRendererType = \"classBreaks\";\r\n public readonly defaultSymbol?: EsriSymbol;\r\n public get classificationMethod() {return this._props.classificationMethod;}\r\n public readonly classBreakInfos: EsriClassBreaksValueInfo[] = [];\r\n\r\n public override get fields() {\r\n if (this.field)\r\n return [this.field];\r\n\r\n return undefined;\r\n }\r\n\r\n public get field() { return this._props.field ?? undefined; }\r\n public get minValue() { return this._props.minValue ?? 0; }\r\n\r\n protected constructor(json: EsriClassBreaksRendererProps) {\r\n super();\r\n if (json.defaultSymbol)\r\n this.defaultSymbol = EsriSymbol.fromJSON(json.defaultSymbol);\r\n\r\n for (const cbi of json.classBreakInfos) {\r\n this.classBreakInfos.push(EsriClassBreaksValueInfo.fromJSON(cbi));\r\n }\r\n\r\n this._props = json;\r\n }\r\n\r\n public override async initialize() {\r\n const promises: Promise<void>[] = [];\r\n if (this.defaultSymbol?.type === \"esriPMS\") {\r\n promises.push((this.defaultSymbol as EsriPMS).loadImage());\r\n }\r\n for (const cbi of this.classBreakInfos) {\r\n if (cbi.symbol.type === \"esriPMS\") {\r\n promises.push((cbi.symbol as EsriPMS).loadImage());\r\n }\r\n }\r\n await Promise.all(promises);\r\n }\r\n\r\n public static override fromJSON(json: EsriClassBreaksRendererProps) {\r\n return new EsriClassBreaksRenderer(json);\r\n }\r\n}\r\n\r\n"]}
|