@itwin/map-layers-formats 5.0.0-dev.4 → 5.0.0-dev.40
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 +28 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js +29 -31
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js +26 -28
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
- package/lib/cjs/ArcGisFeature/esriPBuffer.gen.js +48 -72
- package/lib/cjs/ArcGisFeature/esriPBuffer.gen.js.map +1 -1
- package/lib/cjs/Feature/RandomMapColor.js +10 -10
- package/lib/cjs/Feature/RandomMapColor.js.map +1 -1
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesFormat.js +1 -1
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesFormat.js.map +1 -1
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesProvider.js +21 -21
- package/lib/cjs/OgcApiFeatures/OgcApiFeaturesProvider.js.map +1 -1
- package/lib/cjs/Tools/MapFeatureInfoTool.js +2 -2
- package/lib/cjs/Tools/MapFeatureInfoTool.js.map +1 -1
- package/lib/cjs/mapLayersFormats.js +1 -1
- package/lib/cjs/mapLayersFormats.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js +29 -31
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js +26 -28
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
- package/lib/esm/ArcGisFeature/esriPBuffer.gen.js +48 -72
- package/lib/esm/ArcGisFeature/esriPBuffer.gen.js.map +1 -1
- package/lib/esm/Feature/RandomMapColor.js +10 -10
- package/lib/esm/Feature/RandomMapColor.js.map +1 -1
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesFormat.js +1 -1
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesFormat.js.map +1 -1
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesProvider.js +21 -21
- package/lib/esm/OgcApiFeatures/OgcApiFeaturesProvider.js.map +1 -1
- package/lib/esm/Tools/MapFeatureInfoTool.js +2 -2
- package/lib/esm/Tools/MapFeatureInfoTool.js.map +1 -1
- package/lib/esm/mapLayersFormats.js +1 -1
- package/lib/esm/mapLayersFormats.js.map +1 -1
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArcGisSymbologyRenderer.js","sourceRoot":"","sources":["../../../src/ArcGisFeature/ArcGisSymbologyRenderer.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;AAE/F,sDAA6C;AAI7C,wDAA6C;AAI7C,gBAAgB;AAChB,MAAM,cAAc,GAAI,gCAAgC,CAAC;AAczD,gBAAgB;AAChB,MAAsB,6BAA6B;IAAnD;QAOS,uBAAkB,GAAW,EAAE,CAAC;IAezC,CAAC;IATQ,MAAM,CAAC,MAAM,CAAC,QAAgC,EAAE,aAAsC,EAAE,YAAwC;QACrI,IAAI,QAAQ,EAAE,IAAI,KAAK,aAAa,EAAE,CAAC;YACrC,OAAO,IAAI,kCAAkC,CAAC,QAAmC,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;QAClH,CAAC;aAAM,IAAI,QAAQ,EAAE,IAAI,KAAK,aAAa,EAAE,CAAC;YAC5C,OAAO,IAAI,kCAAkC,CAAC,QAAmC,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;QAClH,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,6BA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YACH,CAAC;YAED,iEAAiE;YACjE,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC;YACnC,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA5DD,gFA4DC","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 { ColorDef } from \"@itwin/core-common\";\nimport { EsriClassBreaksRenderer, EsriPMS, EsriRenderer, EsriSFS, EsriSimpleRenderer, EsriSLS, EsriSLSStyle, EsriSMS, EsriSymbol, EsriUniqueValueRenderer } from \"./EsriSymbology\";\nimport { FeatureAttributeDrivenSymbology, FeatureSymbologyRenderer } from \"@itwin/core-frontend\";\nimport { Angle } from \"@itwin/core-geometry\";\nimport { FeatureDefaultSymbology } from \"../Feature/FeatureSymbology\";\nimport { ArcGisFeatureGeometryType } from \"./ArcGisFeatureQuery\";\n\n/** @internal */\nconst loggerCategory = \"MapLayersFormats.ArcGISFeature\";\n\n/** @internal */\nexport type ArcGisSymbologyRendererType = \"simple\" | \"attributeDriven\";\n\n/** Feature Symbology renderer applicable to an HTML 2D Canvas\n * @internal\n */\nexport interface FeatureSymbologyCanvasRenderer extends FeatureSymbologyRenderer {\n applyFillStyle(context: CanvasRenderingContext2D): void;\n applyStrokeStyle(context: CanvasRenderingContext2D): void;\n drawPoint(context: CanvasRenderingContext2D, ptX: number, ptY: number): void;\n}\n\n/** @internal */\nexport abstract class ArcGisSymbologyCanvasRenderer implements FeatureSymbologyCanvasRenderer {\n\n public abstract readonly renderer?: EsriRenderer;\n\n public abstract get symbol(): EsriSymbol;\n public abstract set symbol(symbol: EsriSymbol|undefined);\n public abstract get defaultSymbol(): EsriSymbol;\n public activeGeometryType: string = \"\";\n public abstract isAttributeDriven(): this is FeatureAttributeDrivenSymbology;\n public abstract applyFillStyle(context: CanvasRenderingContext2D): void;\n public abstract applyStrokeStyle(context: CanvasRenderingContext2D): void;\n public abstract drawPoint(context: CanvasRenderingContext2D, ptX: number, ptY: number): void;\n\n public static create(renderer: EsriRenderer|undefined, defaultSymbol: FeatureDefaultSymbology, geometryType?: ArcGisFeatureGeometryType): ArcGisSymbologyCanvasRenderer {\n if (renderer?.type === \"uniqueValue\") {\n return new ArcGisUniqueValueSymbologyRenderer(renderer as EsriUniqueValueRenderer, defaultSymbol, geometryType);\n } else if (renderer?.type === \"classBreaks\") {\n return new ArcGisClassBreaksSymbologyRenderer(renderer as EsriClassBreaksRenderer, defaultSymbol, geometryType);\n } else {\n return new ArcGisSimpleSymbologyRenderer(renderer, defaultSymbol, geometryType);\n }\n }\n}\n\n/** @internal */\nexport class ArcGisDashLineStyle {\n // ESRI does not provide any values for their line style definition, those values have been\n // determined by pixel-peeping tiles rendered by ArcGIS servers.\n // Available line styles are documented here: https://developers.arcgis.com/web-map-specification/objects/esriSLS_symbol/\n private static _dashLineLength = 6;\n private static _dashGapLength = 3;\n private static _dashShortLineLength = 3;\n private static _dashShortGapLength = 3;\n private static _dashLongLineLength = 12;\n private static _dashLongLineDotDotLength = 18;\n private static _dashLongGapLength = 6;\n private static _dotLineLength = 2;\n private static _dotGapLength = 3;\n private static _shortDotLineLength = 1;\n private static _shortDotGapLength = 2;\n public static dashValues = {\n esriSLSDash : [this._dashLineLength, this._dashGapLength],\n esriSLSDashDot : [this._dashLineLength, this._dotGapLength, this._dotLineLength, this._dotGapLength],\n esriSLSDashDotDot : [this._dashLongLineLength, this._dotGapLength, this._dotLineLength, this._dotGapLength, this._dotLineLength, this._dotGapLength],\n esriSLSDot : [this._dashLineLength, this._dotGapLength],\n esriSLSLongDash : [this._dashLongLineLength, this._dashLongGapLength],\n esriSLSLongDashDot : [this._dashLongLineDotDotLength, this._dashGapLength, this._dotLineLength, this._dashGapLength],\n esriSLSShortDash : [this._dashShortLineLength, this._dashShortGapLength],\n esriSLSShortDashDot : [this._dashShortLineLength, this._dashShortGapLength, this._dotLineLength, this._dashShortGapLength],\n esriSLSShortDashDotDot : [this._dashLineLength, this._dashShortGapLength, this._dotLineLength, this._dashGapLength, this._dotLineLength, this._dashShortGapLength],\n esriSLSShortDot : [this._shortDotLineLength, this._shortDotGapLength],\n };\n\n}\n\n/** @internal */\nexport class ArcGisSimpleSymbologyRenderer extends ArcGisSymbologyCanvasRenderer {\n\n protected _symbol: EsriSymbol|undefined;\n protected _defaultSymbol: FeatureDefaultSymbology;\n\n public override isAttributeDriven(): this is FeatureAttributeDrivenSymbology {return false;}\n public lineWidthScaleFactor = 2; // This is value is empirical, this might need to be adjusted\n\n public get symbol(): EsriSymbol {return (this._symbol ?? this.defaultSymbol);}\n public set symbol(symbol: EsriSymbol|undefined) {this._symbol = symbol;}\n\n public get defaultSymbol() {return this._defaultSymbol.getSymbology(this.activeGeometryType) as EsriSymbol;}\n public override readonly renderer?: EsriRenderer;\n\n public constructor(renderer: EsriRenderer|undefined, defaultSymbol: FeatureDefaultSymbology, geometryType?: ArcGisFeatureGeometryType) {\n super();\n this._defaultSymbol = defaultSymbol;\n\n // ArcGIS service normally advertise upfront he geometry of all features. It's always possible to opt-out, but then\n // you will have to set the activeGeometryType before rendering.\n if (geometryType)\n this.activeGeometryType = geometryType;\n this.renderer = renderer;\n\n if (this.renderer?.type === \"simple\") {\n this._symbol = (this.renderer as EsriSimpleRenderer).symbol;\n }\n }\n\n public applyFillStyle(context: CanvasRenderingContext2D) {\n if (!context)\n return;\n\n const fillColor = this.getFillColor();\n if (fillColor) {\n context.fillStyle = fillColor.toRgbaString();\n } else {\n Logger.logTrace(loggerCategory, `Could not apply fill style`);\n }\n }\n\n private getFillColor() {\n const symbol = this.symbol;\n let fillColor: ColorDef | undefined;\n if (symbol.type === \"esriSFS\") {\n const sfs = symbol as EsriSFS;\n if (sfs.color) {\n fillColor = sfs.color;\n }\n } else if (symbol.type === \"esriSMS\") {\n const sms = symbol as EsriSMS;\n if (sms.color) {\n fillColor = sms.color;\n }\n }\n\n return fillColor;\n }\n\n private applyLineDash(context: CanvasRenderingContext2D, slsStyle: EsriSLSStyle) {\n if (slsStyle !== \"esriSLSSolid\" && slsStyle !== \"esriSLSNull\") {\n context.setLineDash(ArcGisDashLineStyle.dashValues[slsStyle]);\n }\n }\n\n public applyStrokeStyle(context: CanvasRenderingContext2D) {\n if (!context)\n return;\n\n // Stroke style can be from SFS's outline style or a SLS's color\n let sls: EsriSLS | undefined;\n const symbol = this.symbol;\n if (symbol.type === \"esriSFS\") {\n const sfs = this.symbol as EsriSFS;\n if (sfs.outline) {\n sls = sfs.outline;\n }\n } else if (symbol.type === \"esriSLS\") {\n sls = this.symbol as EsriSLS;\n } else if (symbol.type === \"esriSMS\") {\n const sms = this.symbol as EsriSMS;\n if (sms.outline) {\n sls = sms.outline;\n }\n }\n\n if (sls) {\n\n context.lineWidth = (sls.width > 0 ? sls.width : 1);\n if (symbol.type === \"esriSLS\")\n context.lineWidth *= this.lineWidthScaleFactor;\n if (sls.color) {\n context.strokeStyle = sls.color.toRgbaString();\n }\n if (sls.style) {\n this.applyLineDash(context, sls.style);\n }\n } else {\n Logger.logTrace(loggerCategory, `Could not apply stroke style`);\n }\n\n }\n /**\n * Draw a simple marker\n * @param x x-axis coordinate in the destination canvas at which to place the center of the marker\n * @param y y-axis coordinate in the destination canvas at which to place the center of the marker\n * @param size size of the marker\n * @public\n */\n public drawSimpleMarker(context: CanvasRenderingContext2D, sms: EsriSMS, x: number, y: number, size: number) {\n const halfSize = sms.size * 0.5;\n if (sms.angle) {\n context.save();\n context.translate(x,y);\n const angle = Angle.createDegrees(sms.angle);\n context.rotate(angle.radians);\n context.translate(-x,-y);\n }\n\n if (sms.style === \"esriSMSSquare\") {\n\n const dx = x + (-0.5 * size);\n const dy = y + (-0.5 * size);\n if (sms.color) {\n this.applyFillStyle(context);\n context.fillRect(dx, dy, size, size);\n }\n if (sms.outline) {\n this.applyStrokeStyle(context);\n context.strokeRect(dx, dy, size, size);\n }\n\n } else if (sms.style === \"esriSMSCircle\") {\n context.beginPath();\n context.arc(x, y, size*0.5, 0, 2*Math.PI);\n context.closePath();\n if (sms.color) {\n this.applyFillStyle(context);\n context.fill();\n }\n if (sms.outline) {\n this.applyStrokeStyle(context);\n context.stroke();\n }\n } else if (sms.style === \"esriSMSCross\") {\n context.beginPath();\n context.moveTo(x-halfSize, y);\n context.lineTo(x+halfSize, y);\n context.moveTo(x, y-halfSize);\n context.lineTo(x, y+halfSize);\n if (sms.outline) {\n this.applyStrokeStyle(context);\n }\n context.stroke();\n } else if (sms.style === \"esriSMSDiamond\") {\n context.beginPath();\n\n context.moveTo(x, y-halfSize);\n context.lineTo(x+halfSize, y);\n context.lineTo(x, y+halfSize);\n context.lineTo(x-halfSize, y);\n context.closePath();\n if (sms.color) {\n this.applyFillStyle(context);\n context.fill();\n }\n if (sms.outline) {\n this.applyStrokeStyle(context);\n }\n context.stroke();\n } else if (sms.style === \"esriSMSTriangle\") {\n context.beginPath();\n context.moveTo(x, y-halfSize);\n context.lineTo(x+halfSize, y+halfSize);\n context.lineTo(x-halfSize, y+halfSize);\n\n context.closePath();\n if (sms.color) {\n this.applyFillStyle(context);\n context.fill();\n }\n if (sms.outline) {\n this.applyStrokeStyle(context);\n }\n context.stroke();\n } else if(sms.style === \"esriSMSX\") {\n context.beginPath();\n context.moveTo(x-halfSize, y-halfSize);\n context.lineTo(x+halfSize, y+halfSize);\n context.moveTo(x-halfSize, y+halfSize);\n context.lineTo(x+halfSize, y-halfSize);\n if (sms.outline) {\n this.applyStrokeStyle(context);\n }\n context.stroke();\n }\n if (sms.angle)\n context.restore();\n }\n\n public drawPoint(context: CanvasRenderingContext2D, ptX: number, ptY: number) {\n if (!context)\n return;\n\n const symbol = this.symbol;\n\n if (symbol.type === \"esriPMS\") {\n const pms = this.symbol as EsriPMS;\n const angleDegrees = pms.angle;\n\n // We scale up a little a bit the size of symbol.\n // const width = pms.width === undefined ? pms.width : pms.width * 1.25;\n // const height = pms.height === undefined ? pms.height : pms.height * 1.25;\n const width = pms.width;\n const height = pms.height;\n\n let xOffset = 0, yOffset = 0;\n\n // Center the marker around the anchor point\n if (width)\n xOffset = width * -0.5;\n if (height)\n yOffset = height * -0.5;\n\n // Add additional offset\n if (pms.xoffset)\n xOffset += pms.xoffset;\n if (pms.yoffset)\n yOffset += pms.yoffset;\n\n const dx = ptX + xOffset;\n const dy = ptY + yOffset;\n\n if (angleDegrees) {\n context.save();\n context.translate(ptX, ptY);\n const angle = Angle.createDegrees(angleDegrees);\n context.rotate(angle.radians);\n context.translate(-ptX, -ptY);\n }\n\n if (width && height) {\n context.drawImage(pms.image, dx, dy, width, height);\n } else {\n context.drawImage(pms.image, dx, dy);\n }\n\n if (angleDegrees)\n context.restore();\n\n } else if (symbol.type === \"esriSMS\") {\n const sms = this.symbol as EsriSMS;\n\n let xOffset = 0;\n let yOffset = 0;\n\n if (sms.xoffset)\n xOffset += sms.xoffset;\n\n if (sms.yoffset)\n yOffset += sms.yoffset;\n\n this.drawSimpleMarker(context, sms, ptX + xOffset, ptY + yOffset, sms.size);\n }\n }\n}\n\n/** @internal */\nexport class ArcGisUniqueValueSymbologyRenderer extends ArcGisSimpleSymbologyRenderer implements FeatureAttributeDrivenSymbology {\n public override isAttributeDriven(): this is FeatureAttributeDrivenSymbology {return true;}\n protected _activeFeatureAttributes: {[key: string]: any} | undefined;\n protected uvRenderer: EsriUniqueValueRenderer;\n private _defaultRenderSymbol: EsriSymbol|undefined;\n\n public override get defaultSymbol() {return this._defaultRenderSymbol ?? super.defaultSymbol;}\n\n public get rendererFields() {\n if (this.uvRenderer.field1)\n return [this.uvRenderer.field1];\n else\n return undefined;\n }\n\n public constructor(renderer: EsriUniqueValueRenderer, defaultSymbol: FeatureDefaultSymbology, geometryType?: ArcGisFeatureGeometryType) {\n super(renderer, defaultSymbol, geometryType);\n\n this.uvRenderer = (this.renderer as EsriUniqueValueRenderer);\n this._defaultRenderSymbol = this.uvRenderer.defaultSymbol;\n }\n\n public setActiveFeatureAttributes(attributes: { [key: string]: any }) {\n this._activeFeatureAttributes = attributes;\n\n let newSymbolApplied = false;\n if (this._activeFeatureAttributes) {\n if (this.uvRenderer.field1 && Object.keys(this._activeFeatureAttributes).includes(this.uvRenderer.field1)) {\n\n const queryValue = this._activeFeatureAttributes[this.uvRenderer.field1];\n\n if (queryValue !== null && queryValue !== undefined) {\n for (const uvi of this.uvRenderer.uniqueValueInfos) {\n // Strangely, ArcGIS documentation says 'value' is a string,\n // not too sure if a comparison on other types is possible, or its always forced to string properties?\n if (uvi.value === queryValue.toString()) {\n this.symbol = uvi.symbol ;\n newSymbolApplied = true;\n break;\n }\n }\n }\n }\n }\n\n // Fallback to default symbology to make sure we render something\n if (!newSymbolApplied) {\n this.symbol = undefined;\n }\n }\n}\n\n/** @internal */\nexport class ArcGisClassBreaksSymbologyRenderer extends ArcGisSimpleSymbologyRenderer implements FeatureAttributeDrivenSymbology {\n public override isAttributeDriven(): this is FeatureAttributeDrivenSymbology {return true;}\n protected _activeFeatureAttributes: {[key: string]: any} | undefined;\n protected cbRenderer: EsriClassBreaksRenderer;\n private _defaultRenderSymbol: EsriSymbol|undefined;\n\n public override get defaultSymbol() {return this._defaultRenderSymbol ?? super.defaultSymbol;}\n\n public get rendererFields() {\n if (this.cbRenderer)\n return [this.cbRenderer.field];\n else\n return undefined;\n }\n\n public constructor(renderer: EsriClassBreaksRenderer, defaultSymbol: FeatureDefaultSymbology, geometryType?: ArcGisFeatureGeometryType) {\n super(renderer, defaultSymbol, geometryType);\n\n this.cbRenderer = (this.renderer as EsriClassBreaksRenderer);\n this._defaultRenderSymbol = this.cbRenderer.defaultSymbol;\n }\n\n public setActiveFeatureAttributes(attributes: { [key: string]: any }) {\n this._activeFeatureAttributes = attributes;\n\n const newSymbolApplied = false;\n if (this._activeFeatureAttributes) {\n if (Object.keys(this._activeFeatureAttributes).includes(this.cbRenderer.field)) {\n\n const queryValue = this._activeFeatureAttributes[this.cbRenderer.field];\n\n if (queryValue !== null && queryValue !== undefined) {\n let currentMinValue: number|undefined;\n let currentClassIdx = 0;\n do {\n const currentClass = this.cbRenderer.classBreakInfos[currentClassIdx];\n if (currentClass.classMinValue !== undefined) {\n currentMinValue = currentClass.classMinValue;\n } else if (currentClass.classMinValue === undefined && currentClassIdx > 0) {\n currentMinValue = this.cbRenderer.classBreakInfos[currentClassIdx-1].classMaxValue;\n } else {\n currentMinValue = this.cbRenderer.minValue;\n }\n\n if ( queryValue >= currentMinValue\n && queryValue <= currentClass.classMaxValue) {\n this.symbol = currentClass.symbol;\n return;\n }\n }\n while (++currentClassIdx < this.cbRenderer.classBreakInfos.length);\n }\n }\n\n // Fallback to default symbology to make sure we render something\n if (!newSymbolApplied) {\n this.symbol = this.defaultSymbol;\n }\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ArcGisSymbologyRenderer.js","sourceRoot":"","sources":["../../../src/ArcGisFeature/ArcGisSymbologyRenderer.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,sDAA6C;AAI7C,wDAA6C;AAI7C,gBAAgB;AAChB,MAAM,cAAc,GAAI,gCAAgC,CAAC;AAczD,gBAAgB;AAChB,MAAsB,6BAA6B;IAAnD;QAOS,uBAAkB,GAAW,EAAE,CAAC;IAezC,CAAC;IATQ,MAAM,CAAC,MAAM,CAAC,QAAgC,EAAE,aAAsC,EAAE,YAAwC;QACrI,IAAI,QAAQ,EAAE,IAAI,KAAK,aAAa,EAAE,CAAC;YACrC,OAAO,IAAI,kCAAkC,CAAC,QAAmC,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;QAClH,CAAC;aAAM,IAAI,QAAQ,EAAE,IAAI,KAAK,aAAa,EAAE,CAAC;YAC5C,OAAO,IAAI,kCAAkC,CAAC,QAAmC,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;QAClH,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,6BAA6B,CAAC,QAAQ,EAA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,CAAC;YACnC,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA5DD,gFA4DC","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 { ColorDef } from \"@itwin/core-common\";\nimport { EsriClassBreaksRenderer, EsriPMS, EsriRenderer, EsriSFS, EsriSimpleRenderer, EsriSLS, EsriSLSStyle, EsriSMS, EsriSymbol, EsriUniqueValueRenderer } from \"./EsriSymbology\";\nimport { FeatureAttributeDrivenSymbology, FeatureSymbologyRenderer } from \"@itwin/core-frontend\";\nimport { Angle } from \"@itwin/core-geometry\";\nimport { FeatureDefaultSymbology } from \"../Feature/FeatureSymbology\";\nimport { ArcGisFeatureGeometryType } from \"./ArcGisFeatureQuery\";\n\n/** @internal */\nconst loggerCategory = \"MapLayersFormats.ArcGISFeature\";\n\n/** @internal */\nexport type ArcGisSymbologyRendererType = \"simple\" | \"attributeDriven\";\n\n/** Feature Symbology renderer applicable to an HTML 2D Canvas\n * @internal\n */\nexport interface FeatureSymbologyCanvasRenderer extends FeatureSymbologyRenderer {\n applyFillStyle(context: CanvasRenderingContext2D): void;\n applyStrokeStyle(context: CanvasRenderingContext2D): void;\n drawPoint(context: CanvasRenderingContext2D, ptX: number, ptY: number): void;\n}\n\n/** @internal */\nexport abstract class ArcGisSymbologyCanvasRenderer implements FeatureSymbologyCanvasRenderer {\n\n public abstract readonly renderer?: EsriRenderer;\n\n public abstract get symbol(): EsriSymbol;\n public abstract set symbol(symbol: EsriSymbol|undefined);\n public abstract get defaultSymbol(): EsriSymbol;\n public activeGeometryType: string = \"\";\n public abstract isAttributeDriven(): this is FeatureAttributeDrivenSymbology;\n public abstract applyFillStyle(context: CanvasRenderingContext2D): void;\n public abstract applyStrokeStyle(context: CanvasRenderingContext2D): void;\n public abstract drawPoint(context: CanvasRenderingContext2D, ptX: number, ptY: number): void;\n\n public static create(renderer: EsriRenderer|undefined, defaultSymbol: FeatureDefaultSymbology, geometryType?: ArcGisFeatureGeometryType): ArcGisSymbologyCanvasRenderer {\n if (renderer?.type === \"uniqueValue\") {\n return new ArcGisUniqueValueSymbologyRenderer(renderer as EsriUniqueValueRenderer, defaultSymbol, geometryType);\n } else if (renderer?.type === \"classBreaks\") {\n return new ArcGisClassBreaksSymbologyRenderer(renderer as EsriClassBreaksRenderer, defaultSymbol, geometryType);\n } else {\n return new ArcGisSimpleSymbologyRenderer(renderer, defaultSymbol, geometryType);\n }\n }\n}\n\n/** @internal */\nexport class ArcGisDashLineStyle {\n // ESRI does not provide any values for their line style definition, those values have been\n // determined by pixel-peeping tiles rendered by ArcGIS servers.\n // Available line styles are documented here: https://developers.arcgis.com/web-map-specification/objects/esriSLS_symbol/\n private static _dashLineLength = 6;\n private static _dashGapLength = 3;\n private static _dashShortLineLength = 3;\n private static _dashShortGapLength = 3;\n private static _dashLongLineLength = 12;\n private static _dashLongLineDotDotLength = 18;\n private static _dashLongGapLength = 6;\n private static _dotLineLength = 2;\n private static _dotGapLength = 3;\n private static _shortDotLineLength = 1;\n private static _shortDotGapLength = 2;\n public static dashValues = {\n esriSLSDash : [this._dashLineLength, this._dashGapLength],\n esriSLSDashDot : [this._dashLineLength, this._dotGapLength, this._dotLineLength, this._dotGapLength],\n esriSLSDashDotDot : [this._dashLongLineLength, this._dotGapLength, this._dotLineLength, this._dotGapLength, this._dotLineLength, this._dotGapLength],\n esriSLSDot : [this._dashLineLength, this._dotGapLength],\n esriSLSLongDash : [this._dashLongLineLength, this._dashLongGapLength],\n esriSLSLongDashDot : [this._dashLongLineDotDotLength, this._dashGapLength, this._dotLineLength, this._dashGapLength],\n esriSLSShortDash : [this._dashShortLineLength, this._dashShortGapLength],\n esriSLSShortDashDot : [this._dashShortLineLength, this._dashShortGapLength, this._dotLineLength, this._dashShortGapLength],\n esriSLSShortDashDotDot : [this._dashLineLength, this._dashShortGapLength, this._dotLineLength, this._dashGapLength, this._dotLineLength, this._dashShortGapLength],\n esriSLSShortDot : [this._shortDotLineLength, this._shortDotGapLength],\n };\n\n}\n\n/** @internal */\nexport class ArcGisSimpleSymbologyRenderer extends ArcGisSymbologyCanvasRenderer {\n\n protected _symbol: EsriSymbol|undefined;\n protected _defaultSymbol: FeatureDefaultSymbology;\n\n public override isAttributeDriven(): this is FeatureAttributeDrivenSymbology {return false;}\n public lineWidthScaleFactor = 2; // This is value is empirical, this might need to be adjusted\n\n public get symbol(): EsriSymbol {return (this._symbol ?? this.defaultSymbol);}\n public set symbol(symbol: EsriSymbol|undefined) {this._symbol = symbol;}\n\n public get defaultSymbol() {return this._defaultSymbol.getSymbology(this.activeGeometryType) as EsriSymbol;}\n public override readonly renderer?: EsriRenderer;\n\n public constructor(renderer: EsriRenderer|undefined, defaultSymbol: FeatureDefaultSymbology, geometryType?: ArcGisFeatureGeometryType) {\n super();\n this._defaultSymbol = defaultSymbol;\n\n // ArcGIS service normally advertise upfront he geometry of all features. It's always possible to opt-out, but then\n // you will have to set the activeGeometryType before rendering.\n if (geometryType)\n this.activeGeometryType = geometryType;\n this.renderer = renderer;\n\n if (this.renderer?.type === \"simple\") {\n this._symbol = (this.renderer as EsriSimpleRenderer).symbol;\n }\n }\n\n public applyFillStyle(context: CanvasRenderingContext2D) {\n if (!context)\n return;\n\n const fillColor = this.getFillColor();\n if (fillColor) {\n context.fillStyle = fillColor.toRgbaString();\n } else {\n Logger.logTrace(loggerCategory, `Could not apply fill style`);\n }\n }\n\n private getFillColor() {\n const symbol = this.symbol;\n let fillColor: ColorDef | undefined;\n if (symbol.type === \"esriSFS\") {\n const sfs = symbol as EsriSFS;\n if (sfs.color) {\n fillColor = sfs.color;\n }\n } else if (symbol.type === \"esriSMS\") {\n const sms = symbol as EsriSMS;\n if (sms.color) {\n fillColor = sms.color;\n }\n }\n\n return fillColor;\n }\n\n private applyLineDash(context: CanvasRenderingContext2D, slsStyle: EsriSLSStyle) {\n if (slsStyle !== \"esriSLSSolid\" && slsStyle !== \"esriSLSNull\") {\n context.setLineDash(ArcGisDashLineStyle.dashValues[slsStyle]);\n }\n }\n\n public applyStrokeStyle(context: CanvasRenderingContext2D) {\n if (!context)\n return;\n\n // Stroke style can be from SFS's outline style or a SLS's color\n let sls: EsriSLS | undefined;\n const symbol = this.symbol;\n if (symbol.type === \"esriSFS\") {\n const sfs = this.symbol as EsriSFS;\n if (sfs.outline) {\n sls = sfs.outline;\n }\n } else if (symbol.type === \"esriSLS\") {\n sls = this.symbol as EsriSLS;\n } else if (symbol.type === \"esriSMS\") {\n const sms = this.symbol as EsriSMS;\n if (sms.outline) {\n sls = sms.outline;\n }\n }\n\n if (sls) {\n\n context.lineWidth = (sls.width > 0 ? sls.width : 1);\n if (symbol.type === \"esriSLS\")\n context.lineWidth *= this.lineWidthScaleFactor;\n if (sls.color) {\n context.strokeStyle = sls.color.toRgbaString();\n }\n if (sls.style) {\n this.applyLineDash(context, sls.style);\n }\n } else {\n Logger.logTrace(loggerCategory, `Could not apply stroke style`);\n }\n\n }\n /**\n * Draw a simple marker\n * @param x x-axis coordinate in the destination canvas at which to place the center of the marker\n * @param y y-axis coordinate in the destination canvas at which to place the center of the marker\n * @param size size of the marker\n * @public\n */\n public drawSimpleMarker(context: CanvasRenderingContext2D, sms: EsriSMS, x: number, y: number, size: number) {\n const halfSize = sms.size * 0.5;\n if (sms.angle) {\n context.save();\n context.translate(x,y);\n const angle = Angle.createDegrees(sms.angle);\n context.rotate(angle.radians);\n context.translate(-x,-y);\n }\n\n if (sms.style === \"esriSMSSquare\") {\n\n const dx = x + (-0.5 * size);\n const dy = y + (-0.5 * size);\n if (sms.color) {\n this.applyFillStyle(context);\n context.fillRect(dx, dy, size, size);\n }\n if (sms.outline) {\n this.applyStrokeStyle(context);\n context.strokeRect(dx, dy, size, size);\n }\n\n } else if (sms.style === \"esriSMSCircle\") {\n context.beginPath();\n context.arc(x, y, size*0.5, 0, 2*Math.PI);\n context.closePath();\n if (sms.color) {\n this.applyFillStyle(context);\n context.fill();\n }\n if (sms.outline) {\n this.applyStrokeStyle(context);\n context.stroke();\n }\n } else if (sms.style === \"esriSMSCross\") {\n context.beginPath();\n context.moveTo(x-halfSize, y);\n context.lineTo(x+halfSize, y);\n context.moveTo(x, y-halfSize);\n context.lineTo(x, y+halfSize);\n if (sms.outline) {\n this.applyStrokeStyle(context);\n }\n context.stroke();\n } else if (sms.style === \"esriSMSDiamond\") {\n context.beginPath();\n\n context.moveTo(x, y-halfSize);\n context.lineTo(x+halfSize, y);\n context.lineTo(x, y+halfSize);\n context.lineTo(x-halfSize, y);\n context.closePath();\n if (sms.color) {\n this.applyFillStyle(context);\n context.fill();\n }\n if (sms.outline) {\n this.applyStrokeStyle(context);\n }\n context.stroke();\n } else if (sms.style === \"esriSMSTriangle\") {\n context.beginPath();\n context.moveTo(x, y-halfSize);\n context.lineTo(x+halfSize, y+halfSize);\n context.lineTo(x-halfSize, y+halfSize);\n\n context.closePath();\n if (sms.color) {\n this.applyFillStyle(context);\n context.fill();\n }\n if (sms.outline) {\n this.applyStrokeStyle(context);\n }\n context.stroke();\n } else if(sms.style === \"esriSMSX\") {\n context.beginPath();\n context.moveTo(x-halfSize, y-halfSize);\n context.lineTo(x+halfSize, y+halfSize);\n context.moveTo(x-halfSize, y+halfSize);\n context.lineTo(x+halfSize, y-halfSize);\n if (sms.outline) {\n this.applyStrokeStyle(context);\n }\n context.stroke();\n }\n if (sms.angle)\n context.restore();\n }\n\n public drawPoint(context: CanvasRenderingContext2D, ptX: number, ptY: number) {\n if (!context)\n return;\n\n const symbol = this.symbol;\n\n if (symbol.type === \"esriPMS\") {\n const pms = this.symbol as EsriPMS;\n const angleDegrees = pms.angle;\n\n // We scale up a little a bit the size of symbol.\n // const width = pms.width === undefined ? pms.width : pms.width * 1.25;\n // const height = pms.height === undefined ? pms.height : pms.height * 1.25;\n const width = pms.width;\n const height = pms.height;\n\n let xOffset = 0, yOffset = 0;\n\n // Center the marker around the anchor point\n if (width)\n xOffset = width * -0.5;\n if (height)\n yOffset = height * -0.5;\n\n // Add additional offset\n if (pms.xoffset)\n xOffset += pms.xoffset;\n if (pms.yoffset)\n yOffset += pms.yoffset;\n\n const dx = ptX + xOffset;\n const dy = ptY + yOffset;\n\n if (angleDegrees) {\n context.save();\n context.translate(ptX, ptY);\n const angle = Angle.createDegrees(angleDegrees);\n context.rotate(angle.radians);\n context.translate(-ptX, -ptY);\n }\n\n if (width && height) {\n context.drawImage(pms.image, dx, dy, width, height);\n } else {\n context.drawImage(pms.image, dx, dy);\n }\n\n if (angleDegrees)\n context.restore();\n\n } else if (symbol.type === \"esriSMS\") {\n const sms = this.symbol as EsriSMS;\n\n let xOffset = 0;\n let yOffset = 0;\n\n if (sms.xoffset)\n xOffset += sms.xoffset;\n\n if (sms.yoffset)\n yOffset += sms.yoffset;\n\n this.drawSimpleMarker(context, sms, ptX + xOffset, ptY + yOffset, sms.size);\n }\n }\n}\n\n/** @internal */\nexport class ArcGisUniqueValueSymbologyRenderer extends ArcGisSimpleSymbologyRenderer implements FeatureAttributeDrivenSymbology {\n public override isAttributeDriven(): this is FeatureAttributeDrivenSymbology {return true;}\n protected _activeFeatureAttributes: {[key: string]: any} | undefined;\n protected uvRenderer: EsriUniqueValueRenderer;\n private _defaultRenderSymbol: EsriSymbol|undefined;\n\n public override get defaultSymbol() {return this._defaultRenderSymbol ?? super.defaultSymbol;}\n\n public get rendererFields() {\n if (this.uvRenderer.field1)\n return [this.uvRenderer.field1];\n else\n return undefined;\n }\n\n public constructor(renderer: EsriUniqueValueRenderer, defaultSymbol: FeatureDefaultSymbology, geometryType?: ArcGisFeatureGeometryType) {\n super(renderer, defaultSymbol, geometryType);\n\n this.uvRenderer = (this.renderer as EsriUniqueValueRenderer);\n this._defaultRenderSymbol = this.uvRenderer.defaultSymbol;\n }\n\n public setActiveFeatureAttributes(attributes: { [key: string]: any }) {\n this._activeFeatureAttributes = attributes;\n\n let newSymbolApplied = false;\n if (this._activeFeatureAttributes) {\n if (this.uvRenderer.field1 && Object.keys(this._activeFeatureAttributes).includes(this.uvRenderer.field1)) {\n\n const queryValue = this._activeFeatureAttributes[this.uvRenderer.field1];\n\n if (queryValue !== null && queryValue !== undefined) {\n for (const uvi of this.uvRenderer.uniqueValueInfos) {\n // Strangely, ArcGIS documentation says 'value' is a string,\n // not too sure if a comparison on other types is possible, or its always forced to string properties?\n if (uvi.value === queryValue.toString()) {\n this.symbol = uvi.symbol ;\n newSymbolApplied = true;\n break;\n }\n }\n }\n }\n }\n\n // Fallback to default symbology to make sure we render something\n if (!newSymbolApplied) {\n this.symbol = undefined;\n }\n }\n}\n\n/** @internal */\nexport class ArcGisClassBreaksSymbologyRenderer extends ArcGisSimpleSymbologyRenderer implements FeatureAttributeDrivenSymbology {\n public override isAttributeDriven(): this is FeatureAttributeDrivenSymbology {return true;}\n protected _activeFeatureAttributes: {[key: string]: any} | undefined;\n protected cbRenderer: EsriClassBreaksRenderer;\n private _defaultRenderSymbol: EsriSymbol|undefined;\n\n public override get defaultSymbol() {return this._defaultRenderSymbol ?? super.defaultSymbol;}\n\n public get rendererFields() {\n if (this.cbRenderer)\n return [this.cbRenderer.field];\n else\n return undefined;\n }\n\n public constructor(renderer: EsriClassBreaksRenderer, defaultSymbol: FeatureDefaultSymbology, geometryType?: ArcGisFeatureGeometryType) {\n super(renderer, defaultSymbol, geometryType);\n\n this.cbRenderer = (this.renderer as EsriClassBreaksRenderer);\n this._defaultRenderSymbol = this.cbRenderer.defaultSymbol;\n }\n\n public setActiveFeatureAttributes(attributes: { [key: string]: any }) {\n this._activeFeatureAttributes = attributes;\n\n const newSymbolApplied = false;\n if (this._activeFeatureAttributes) {\n if (Object.keys(this._activeFeatureAttributes).includes(this.cbRenderer.field)) {\n\n const queryValue = this._activeFeatureAttributes[this.cbRenderer.field];\n\n if (queryValue !== null && queryValue !== undefined) {\n let currentMinValue: number|undefined;\n let currentClassIdx = 0;\n do {\n const currentClass = this.cbRenderer.classBreakInfos[currentClassIdx];\n if (currentClass.classMinValue !== undefined) {\n currentMinValue = currentClass.classMinValue;\n } else if (currentClass.classMinValue === undefined && currentClassIdx > 0) {\n currentMinValue = this.cbRenderer.classBreakInfos[currentClassIdx-1].classMaxValue;\n } else {\n currentMinValue = this.cbRenderer.minValue;\n }\n\n if ( queryValue >= currentMinValue\n && queryValue <= currentClass.classMaxValue) {\n this.symbol = currentClass.symbol;\n return;\n }\n }\n while (++currentClassIdx < this.cbRenderer.classBreakInfos.length);\n }\n }\n\n // Fallback to default symbology to make sure we render something\n if (!newSymbolApplied) {\n this.symbol = this.defaultSymbol;\n }\n }\n }\n}\n"]}
|
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
4
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
7
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
8
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
9
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
10
|
-
};
|
|
11
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
7
|
exports.esriPBuffer = void 0;
|
|
13
8
|
/* eslint-disable */
|
|
@@ -20,12 +15,11 @@ const pb_1 = require("google-protobuf");
|
|
|
20
15
|
/** @internal */
|
|
21
16
|
var esriPBuffer;
|
|
22
17
|
(function (esriPBuffer) {
|
|
23
|
-
var _FeatureCollectionPBuffer_one_of_decls;
|
|
24
18
|
class FeatureCollectionPBuffer extends pb_1.Message {
|
|
19
|
+
#one_of_decls = [];
|
|
25
20
|
constructor(data) {
|
|
26
21
|
super();
|
|
27
|
-
|
|
28
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _FeatureCollectionPBuffer_one_of_decls, "f"));
|
|
22
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
29
23
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
30
24
|
if ("version" in data && data.version != undefined) {
|
|
31
25
|
this.version = data.version;
|
|
@@ -103,10 +97,8 @@ var esriPBuffer;
|
|
|
103
97
|
return FeatureCollectionPBuffer.deserialize(bytes);
|
|
104
98
|
}
|
|
105
99
|
}
|
|
106
|
-
_FeatureCollectionPBuffer_one_of_decls = new WeakMap();
|
|
107
100
|
esriPBuffer.FeatureCollectionPBuffer = FeatureCollectionPBuffer;
|
|
108
101
|
(function (FeatureCollectionPBuffer) {
|
|
109
|
-
var _SpatialReference_one_of_decls, _Field_one_of_decls, _Value_one_of_decls, _Geometry_one_of_decls, _esriShapeBuffer_one_of_decls, _Feature_one_of_decls, _UniqueIdField_one_of_decls, _GeometryProperties_one_of_decls, _ServerGens_one_of_decls, _Scale_one_of_decls, _Translate_one_of_decls, _Transform_one_of_decls, _FeatureResult_one_of_decls, _CountResult_one_of_decls, _ObjectIdsResult_one_of_decls, _QueryResult_one_of_decls;
|
|
110
102
|
let GeometryType;
|
|
111
103
|
(function (GeometryType) {
|
|
112
104
|
GeometryType[GeometryType["esriGeometryTypePoint"] = 0] = "esriGeometryTypePoint";
|
|
@@ -167,10 +159,10 @@ var esriPBuffer;
|
|
|
167
159
|
QuantizeOriginPostion[QuantizeOriginPostion["lowerLeft"] = 1] = "lowerLeft";
|
|
168
160
|
})(QuantizeOriginPostion = FeatureCollectionPBuffer.QuantizeOriginPostion || (FeatureCollectionPBuffer.QuantizeOriginPostion = {}));
|
|
169
161
|
class SpatialReference extends pb_1.Message {
|
|
162
|
+
#one_of_decls = [];
|
|
170
163
|
constructor(data) {
|
|
171
164
|
super();
|
|
172
|
-
|
|
173
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _SpatialReference_one_of_decls, "f"));
|
|
165
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
174
166
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
175
167
|
if ("wkid" in data && data.wkid != undefined) {
|
|
176
168
|
this.wkid = data.wkid;
|
|
@@ -305,13 +297,12 @@ var esriPBuffer;
|
|
|
305
297
|
return SpatialReference.deserialize(bytes);
|
|
306
298
|
}
|
|
307
299
|
}
|
|
308
|
-
_SpatialReference_one_of_decls = new WeakMap();
|
|
309
300
|
FeatureCollectionPBuffer.SpatialReference = SpatialReference;
|
|
310
301
|
class Field extends pb_1.Message {
|
|
302
|
+
#one_of_decls = [];
|
|
311
303
|
constructor(data) {
|
|
312
304
|
super();
|
|
313
|
-
|
|
314
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _Field_one_of_decls, "f"));
|
|
305
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
315
306
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
316
307
|
if ("name" in data && data.name != undefined) {
|
|
317
308
|
this.name = data.name;
|
|
@@ -466,13 +457,12 @@ var esriPBuffer;
|
|
|
466
457
|
return Field.deserialize(bytes);
|
|
467
458
|
}
|
|
468
459
|
}
|
|
469
|
-
_Field_one_of_decls = new WeakMap();
|
|
470
460
|
FeatureCollectionPBuffer.Field = Field;
|
|
471
461
|
class Value extends pb_1.Message {
|
|
462
|
+
#one_of_decls = [[1, 2, 3, 4, 5, 6, 7, 8, 9]];
|
|
472
463
|
constructor(data) {
|
|
473
464
|
super();
|
|
474
|
-
|
|
475
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _Value_one_of_decls, "f"));
|
|
465
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
476
466
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
477
467
|
if ("string_value" in data && data.string_value != undefined) {
|
|
478
468
|
this.string_value = data.string_value;
|
|
@@ -507,7 +497,7 @@ var esriPBuffer;
|
|
|
507
497
|
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
508
498
|
}
|
|
509
499
|
set string_value(value) {
|
|
510
|
-
pb_1.Message.setOneofField(this, 1,
|
|
500
|
+
pb_1.Message.setOneofField(this, 1, this.#one_of_decls[0], value);
|
|
511
501
|
}
|
|
512
502
|
get has_string_value() {
|
|
513
503
|
return pb_1.Message.getField(this, 1) != null;
|
|
@@ -516,7 +506,7 @@ var esriPBuffer;
|
|
|
516
506
|
return pb_1.Message.getFieldWithDefault(this, 2, 0);
|
|
517
507
|
}
|
|
518
508
|
set float_value(value) {
|
|
519
|
-
pb_1.Message.setOneofField(this, 2,
|
|
509
|
+
pb_1.Message.setOneofField(this, 2, this.#one_of_decls[0], value);
|
|
520
510
|
}
|
|
521
511
|
get has_float_value() {
|
|
522
512
|
return pb_1.Message.getField(this, 2) != null;
|
|
@@ -525,7 +515,7 @@ var esriPBuffer;
|
|
|
525
515
|
return pb_1.Message.getFieldWithDefault(this, 3, 0);
|
|
526
516
|
}
|
|
527
517
|
set double_value(value) {
|
|
528
|
-
pb_1.Message.setOneofField(this, 3,
|
|
518
|
+
pb_1.Message.setOneofField(this, 3, this.#one_of_decls[0], value);
|
|
529
519
|
}
|
|
530
520
|
get has_double_value() {
|
|
531
521
|
return pb_1.Message.getField(this, 3) != null;
|
|
@@ -534,7 +524,7 @@ var esriPBuffer;
|
|
|
534
524
|
return pb_1.Message.getFieldWithDefault(this, 4, 0);
|
|
535
525
|
}
|
|
536
526
|
set sint_value(value) {
|
|
537
|
-
pb_1.Message.setOneofField(this, 4,
|
|
527
|
+
pb_1.Message.setOneofField(this, 4, this.#one_of_decls[0], value);
|
|
538
528
|
}
|
|
539
529
|
get has_sint_value() {
|
|
540
530
|
return pb_1.Message.getField(this, 4) != null;
|
|
@@ -543,7 +533,7 @@ var esriPBuffer;
|
|
|
543
533
|
return pb_1.Message.getFieldWithDefault(this, 5, 0);
|
|
544
534
|
}
|
|
545
535
|
set uint_value(value) {
|
|
546
|
-
pb_1.Message.setOneofField(this, 5,
|
|
536
|
+
pb_1.Message.setOneofField(this, 5, this.#one_of_decls[0], value);
|
|
547
537
|
}
|
|
548
538
|
get has_uint_value() {
|
|
549
539
|
return pb_1.Message.getField(this, 5) != null;
|
|
@@ -552,7 +542,7 @@ var esriPBuffer;
|
|
|
552
542
|
return pb_1.Message.getFieldWithDefault(this, 6, 0);
|
|
553
543
|
}
|
|
554
544
|
set int64_value(value) {
|
|
555
|
-
pb_1.Message.setOneofField(this, 6,
|
|
545
|
+
pb_1.Message.setOneofField(this, 6, this.#one_of_decls[0], value);
|
|
556
546
|
}
|
|
557
547
|
get has_int64_value() {
|
|
558
548
|
return pb_1.Message.getField(this, 6) != null;
|
|
@@ -561,7 +551,7 @@ var esriPBuffer;
|
|
|
561
551
|
return pb_1.Message.getFieldWithDefault(this, 7, 0);
|
|
562
552
|
}
|
|
563
553
|
set uint64_value(value) {
|
|
564
|
-
pb_1.Message.setOneofField(this, 7,
|
|
554
|
+
pb_1.Message.setOneofField(this, 7, this.#one_of_decls[0], value);
|
|
565
555
|
}
|
|
566
556
|
get has_uint64_value() {
|
|
567
557
|
return pb_1.Message.getField(this, 7) != null;
|
|
@@ -570,7 +560,7 @@ var esriPBuffer;
|
|
|
570
560
|
return pb_1.Message.getFieldWithDefault(this, 8, 0);
|
|
571
561
|
}
|
|
572
562
|
set sint64_value(value) {
|
|
573
|
-
pb_1.Message.setOneofField(this, 8,
|
|
563
|
+
pb_1.Message.setOneofField(this, 8, this.#one_of_decls[0], value);
|
|
574
564
|
}
|
|
575
565
|
get has_sint64_value() {
|
|
576
566
|
return pb_1.Message.getField(this, 8) != null;
|
|
@@ -579,7 +569,7 @@ var esriPBuffer;
|
|
|
579
569
|
return pb_1.Message.getFieldWithDefault(this, 9, false);
|
|
580
570
|
}
|
|
581
571
|
set bool_value(value) {
|
|
582
|
-
pb_1.Message.setOneofField(this, 9,
|
|
572
|
+
pb_1.Message.setOneofField(this, 9, this.#one_of_decls[0], value);
|
|
583
573
|
}
|
|
584
574
|
get has_bool_value() {
|
|
585
575
|
return pb_1.Message.getField(this, 9) != null;
|
|
@@ -729,13 +719,12 @@ var esriPBuffer;
|
|
|
729
719
|
return Value.deserialize(bytes);
|
|
730
720
|
}
|
|
731
721
|
}
|
|
732
|
-
_Value_one_of_decls = new WeakMap();
|
|
733
722
|
FeatureCollectionPBuffer.Value = Value;
|
|
734
723
|
class Geometry extends pb_1.Message {
|
|
724
|
+
#one_of_decls = [];
|
|
735
725
|
constructor(data) {
|
|
736
726
|
super();
|
|
737
|
-
|
|
738
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3], __classPrivateFieldGet(this, _Geometry_one_of_decls, "f"));
|
|
727
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3], this.#one_of_decls);
|
|
739
728
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
740
729
|
if ("lengths" in data && data.lengths != undefined) {
|
|
741
730
|
this.lengths = data.lengths;
|
|
@@ -810,13 +799,12 @@ var esriPBuffer;
|
|
|
810
799
|
return Geometry.deserialize(bytes);
|
|
811
800
|
}
|
|
812
801
|
}
|
|
813
|
-
_Geometry_one_of_decls = new WeakMap();
|
|
814
802
|
FeatureCollectionPBuffer.Geometry = Geometry;
|
|
815
803
|
class esriShapeBuffer extends pb_1.Message {
|
|
804
|
+
#one_of_decls = [];
|
|
816
805
|
constructor(data) {
|
|
817
806
|
super();
|
|
818
|
-
|
|
819
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _esriShapeBuffer_one_of_decls, "f"));
|
|
807
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
820
808
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
821
809
|
if ("bytes" in data && data.bytes != undefined) {
|
|
822
810
|
this.bytes = data.bytes;
|
|
@@ -871,13 +859,12 @@ var esriPBuffer;
|
|
|
871
859
|
return esriShapeBuffer.deserialize(bytes);
|
|
872
860
|
}
|
|
873
861
|
}
|
|
874
|
-
_esriShapeBuffer_one_of_decls = new WeakMap();
|
|
875
862
|
FeatureCollectionPBuffer.esriShapeBuffer = esriShapeBuffer;
|
|
876
863
|
class Feature extends pb_1.Message {
|
|
864
|
+
#one_of_decls = [[2, 3]];
|
|
877
865
|
constructor(data) {
|
|
878
866
|
super();
|
|
879
|
-
|
|
880
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], __classPrivateFieldGet(this, _Feature_one_of_decls, "f"));
|
|
867
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls);
|
|
881
868
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
882
869
|
if ("attributes" in data && data.attributes != undefined) {
|
|
883
870
|
this.attributes = data.attributes;
|
|
@@ -903,7 +890,7 @@ var esriPBuffer;
|
|
|
903
890
|
return pb_1.Message.getWrapperField(this, FeatureCollectionPBuffer.Geometry, 2);
|
|
904
891
|
}
|
|
905
892
|
set geometry(value) {
|
|
906
|
-
pb_1.Message.setOneofWrapperField(this, 2,
|
|
893
|
+
pb_1.Message.setOneofWrapperField(this, 2, this.#one_of_decls[0], value);
|
|
907
894
|
}
|
|
908
895
|
get has_geometry() {
|
|
909
896
|
return pb_1.Message.getField(this, 2) != null;
|
|
@@ -912,7 +899,7 @@ var esriPBuffer;
|
|
|
912
899
|
return pb_1.Message.getWrapperField(this, FeatureCollectionPBuffer.esriShapeBuffer, 3);
|
|
913
900
|
}
|
|
914
901
|
set shapeBuffer(value) {
|
|
915
|
-
pb_1.Message.setOneofWrapperField(this, 3,
|
|
902
|
+
pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value);
|
|
916
903
|
}
|
|
917
904
|
get has_shapeBuffer() {
|
|
918
905
|
return pb_1.Message.getField(this, 3) != null;
|
|
@@ -1009,13 +996,12 @@ var esriPBuffer;
|
|
|
1009
996
|
return Feature.deserialize(bytes);
|
|
1010
997
|
}
|
|
1011
998
|
}
|
|
1012
|
-
_Feature_one_of_decls = new WeakMap();
|
|
1013
999
|
FeatureCollectionPBuffer.Feature = Feature;
|
|
1014
1000
|
class UniqueIdField extends pb_1.Message {
|
|
1001
|
+
#one_of_decls = [];
|
|
1015
1002
|
constructor(data) {
|
|
1016
1003
|
super();
|
|
1017
|
-
|
|
1018
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _UniqueIdField_one_of_decls, "f"));
|
|
1004
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1019
1005
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
1020
1006
|
if ("name" in data && data.name != undefined) {
|
|
1021
1007
|
this.name = data.name;
|
|
@@ -1090,13 +1076,12 @@ var esriPBuffer;
|
|
|
1090
1076
|
return UniqueIdField.deserialize(bytes);
|
|
1091
1077
|
}
|
|
1092
1078
|
}
|
|
1093
|
-
_UniqueIdField_one_of_decls = new WeakMap();
|
|
1094
1079
|
FeatureCollectionPBuffer.UniqueIdField = UniqueIdField;
|
|
1095
1080
|
class GeometryProperties extends pb_1.Message {
|
|
1081
|
+
#one_of_decls = [];
|
|
1096
1082
|
constructor(data) {
|
|
1097
1083
|
super();
|
|
1098
|
-
|
|
1099
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _GeometryProperties_one_of_decls, "f"));
|
|
1084
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1100
1085
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
1101
1086
|
if ("shapeAreaFieldName" in data && data.shapeAreaFieldName != undefined) {
|
|
1102
1087
|
this.shapeAreaFieldName = data.shapeAreaFieldName;
|
|
@@ -1191,13 +1176,12 @@ var esriPBuffer;
|
|
|
1191
1176
|
return GeometryProperties.deserialize(bytes);
|
|
1192
1177
|
}
|
|
1193
1178
|
}
|
|
1194
|
-
_GeometryProperties_one_of_decls = new WeakMap();
|
|
1195
1179
|
FeatureCollectionPBuffer.GeometryProperties = GeometryProperties;
|
|
1196
1180
|
class ServerGens extends pb_1.Message {
|
|
1181
|
+
#one_of_decls = [];
|
|
1197
1182
|
constructor(data) {
|
|
1198
1183
|
super();
|
|
1199
|
-
|
|
1200
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _ServerGens_one_of_decls, "f"));
|
|
1184
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1201
1185
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
1202
1186
|
if ("minServerGen" in data && data.minServerGen != undefined) {
|
|
1203
1187
|
this.minServerGen = data.minServerGen;
|
|
@@ -1272,13 +1256,12 @@ var esriPBuffer;
|
|
|
1272
1256
|
return ServerGens.deserialize(bytes);
|
|
1273
1257
|
}
|
|
1274
1258
|
}
|
|
1275
|
-
_ServerGens_one_of_decls = new WeakMap();
|
|
1276
1259
|
FeatureCollectionPBuffer.ServerGens = ServerGens;
|
|
1277
1260
|
class Scale extends pb_1.Message {
|
|
1261
|
+
#one_of_decls = [];
|
|
1278
1262
|
constructor(data) {
|
|
1279
1263
|
super();
|
|
1280
|
-
|
|
1281
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _Scale_one_of_decls, "f"));
|
|
1264
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1282
1265
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
1283
1266
|
if ("xScale" in data && data.xScale != undefined) {
|
|
1284
1267
|
this.xScale = data.xScale;
|
|
@@ -1393,13 +1376,12 @@ var esriPBuffer;
|
|
|
1393
1376
|
return Scale.deserialize(bytes);
|
|
1394
1377
|
}
|
|
1395
1378
|
}
|
|
1396
|
-
_Scale_one_of_decls = new WeakMap();
|
|
1397
1379
|
FeatureCollectionPBuffer.Scale = Scale;
|
|
1398
1380
|
class Translate extends pb_1.Message {
|
|
1381
|
+
#one_of_decls = [];
|
|
1399
1382
|
constructor(data) {
|
|
1400
1383
|
super();
|
|
1401
|
-
|
|
1402
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _Translate_one_of_decls, "f"));
|
|
1384
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1403
1385
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
1404
1386
|
if ("xTranslate" in data && data.xTranslate != undefined) {
|
|
1405
1387
|
this.xTranslate = data.xTranslate;
|
|
@@ -1514,13 +1496,12 @@ var esriPBuffer;
|
|
|
1514
1496
|
return Translate.deserialize(bytes);
|
|
1515
1497
|
}
|
|
1516
1498
|
}
|
|
1517
|
-
_Translate_one_of_decls = new WeakMap();
|
|
1518
1499
|
FeatureCollectionPBuffer.Translate = Translate;
|
|
1519
1500
|
class Transform extends pb_1.Message {
|
|
1501
|
+
#one_of_decls = [];
|
|
1520
1502
|
constructor(data) {
|
|
1521
1503
|
super();
|
|
1522
|
-
|
|
1523
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _Transform_one_of_decls, "f"));
|
|
1504
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1524
1505
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
1525
1506
|
if ("quantizeOriginPostion" in data && data.quantizeOriginPostion != undefined) {
|
|
1526
1507
|
this.quantizeOriginPostion = data.quantizeOriginPostion;
|
|
@@ -1621,13 +1602,12 @@ var esriPBuffer;
|
|
|
1621
1602
|
return Transform.deserialize(bytes);
|
|
1622
1603
|
}
|
|
1623
1604
|
}
|
|
1624
|
-
_Transform_one_of_decls = new WeakMap();
|
|
1625
1605
|
FeatureCollectionPBuffer.Transform = Transform;
|
|
1626
1606
|
class FeatureResult extends pb_1.Message {
|
|
1607
|
+
#one_of_decls = [];
|
|
1627
1608
|
constructor(data) {
|
|
1628
1609
|
super();
|
|
1629
|
-
|
|
1630
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [13, 14, 15], __classPrivateFieldGet(this, _FeatureResult_one_of_decls, "f"));
|
|
1610
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [13, 14, 15], this.#one_of_decls);
|
|
1631
1611
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
1632
1612
|
if ("objectIdFieldName" in data && data.objectIdFieldName != undefined) {
|
|
1633
1613
|
this.objectIdFieldName = data.objectIdFieldName;
|
|
@@ -1977,13 +1957,12 @@ var esriPBuffer;
|
|
|
1977
1957
|
return FeatureResult.deserialize(bytes);
|
|
1978
1958
|
}
|
|
1979
1959
|
}
|
|
1980
|
-
_FeatureResult_one_of_decls = new WeakMap();
|
|
1981
1960
|
FeatureCollectionPBuffer.FeatureResult = FeatureResult;
|
|
1982
1961
|
class CountResult extends pb_1.Message {
|
|
1962
|
+
#one_of_decls = [];
|
|
1983
1963
|
constructor(data) {
|
|
1984
1964
|
super();
|
|
1985
|
-
|
|
1986
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _CountResult_one_of_decls, "f"));
|
|
1965
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1987
1966
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
1988
1967
|
if ("count" in data && data.count != undefined) {
|
|
1989
1968
|
this.count = data.count;
|
|
@@ -2038,13 +2017,12 @@ var esriPBuffer;
|
|
|
2038
2017
|
return CountResult.deserialize(bytes);
|
|
2039
2018
|
}
|
|
2040
2019
|
}
|
|
2041
|
-
_CountResult_one_of_decls = new WeakMap();
|
|
2042
2020
|
FeatureCollectionPBuffer.CountResult = CountResult;
|
|
2043
2021
|
class ObjectIdsResult extends pb_1.Message {
|
|
2022
|
+
#one_of_decls = [];
|
|
2044
2023
|
constructor(data) {
|
|
2045
2024
|
super();
|
|
2046
|
-
|
|
2047
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], __classPrivateFieldGet(this, _ObjectIdsResult_one_of_decls, "f"));
|
|
2025
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls);
|
|
2048
2026
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
2049
2027
|
if ("objectIdFieldName" in data && data.objectIdFieldName != undefined) {
|
|
2050
2028
|
this.objectIdFieldName = data.objectIdFieldName;
|
|
@@ -2142,13 +2120,12 @@ var esriPBuffer;
|
|
|
2142
2120
|
return ObjectIdsResult.deserialize(bytes);
|
|
2143
2121
|
}
|
|
2144
2122
|
}
|
|
2145
|
-
_ObjectIdsResult_one_of_decls = new WeakMap();
|
|
2146
2123
|
FeatureCollectionPBuffer.ObjectIdsResult = ObjectIdsResult;
|
|
2147
2124
|
class QueryResult extends pb_1.Message {
|
|
2125
|
+
#one_of_decls = [[1, 2, 3]];
|
|
2148
2126
|
constructor(data) {
|
|
2149
2127
|
super();
|
|
2150
|
-
|
|
2151
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _QueryResult_one_of_decls, "f"));
|
|
2128
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
2152
2129
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
2153
2130
|
if ("featureResult" in data && data.featureResult != undefined) {
|
|
2154
2131
|
this.featureResult = data.featureResult;
|
|
@@ -2165,7 +2142,7 @@ var esriPBuffer;
|
|
|
2165
2142
|
return pb_1.Message.getWrapperField(this, FeatureCollectionPBuffer.FeatureResult, 1);
|
|
2166
2143
|
}
|
|
2167
2144
|
set featureResult(value) {
|
|
2168
|
-
pb_1.Message.setOneofWrapperField(this, 1,
|
|
2145
|
+
pb_1.Message.setOneofWrapperField(this, 1, this.#one_of_decls[0], value);
|
|
2169
2146
|
}
|
|
2170
2147
|
get has_featureResult() {
|
|
2171
2148
|
return pb_1.Message.getField(this, 1) != null;
|
|
@@ -2174,7 +2151,7 @@ var esriPBuffer;
|
|
|
2174
2151
|
return pb_1.Message.getWrapperField(this, FeatureCollectionPBuffer.CountResult, 2);
|
|
2175
2152
|
}
|
|
2176
2153
|
set countResult(value) {
|
|
2177
|
-
pb_1.Message.setOneofWrapperField(this, 2,
|
|
2154
|
+
pb_1.Message.setOneofWrapperField(this, 2, this.#one_of_decls[0], value);
|
|
2178
2155
|
}
|
|
2179
2156
|
get has_countResult() {
|
|
2180
2157
|
return pb_1.Message.getField(this, 2) != null;
|
|
@@ -2183,7 +2160,7 @@ var esriPBuffer;
|
|
|
2183
2160
|
return pb_1.Message.getWrapperField(this, FeatureCollectionPBuffer.ObjectIdsResult, 3);
|
|
2184
2161
|
}
|
|
2185
2162
|
set idsResult(value) {
|
|
2186
|
-
pb_1.Message.setOneofWrapperField(this, 3,
|
|
2163
|
+
pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value);
|
|
2187
2164
|
}
|
|
2188
2165
|
get has_idsResult() {
|
|
2189
2166
|
return pb_1.Message.getField(this, 3) != null;
|
|
@@ -2261,7 +2238,6 @@ var esriPBuffer;
|
|
|
2261
2238
|
return QueryResult.deserialize(bytes);
|
|
2262
2239
|
}
|
|
2263
2240
|
}
|
|
2264
|
-
_QueryResult_one_of_decls = new WeakMap();
|
|
2265
2241
|
FeatureCollectionPBuffer.QueryResult = QueryResult;
|
|
2266
2242
|
})(FeatureCollectionPBuffer = esriPBuffer.FeatureCollectionPBuffer || (esriPBuffer.FeatureCollectionPBuffer = {}));
|
|
2267
2243
|
})(esriPBuffer || (exports.esriPBuffer = esriPBuffer = {}));
|