@itwin/map-layers-formats 5.0.0-dev.50 → 5.0.0-dev.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/Tools/MapFeatureInfoDecorator.d.ts.map +1 -1
- package/lib/cjs/Tools/MapFeatureInfoDecorator.js +5 -6
- package/lib/cjs/Tools/MapFeatureInfoDecorator.js.map +1 -1
- package/lib/esm/Tools/MapFeatureInfoDecorator.d.ts.map +1 -1
- package/lib/esm/Tools/MapFeatureInfoDecorator.js +5 -6
- package/lib/esm/Tools/MapFeatureInfoDecorator.js.map +1 -1
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapFeatureInfoDecorator.d.ts","sourceRoot":"","sources":["../../../src/Tools/MapFeatureInfoDecorator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuB,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACmB,eAAe,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"MapFeatureInfoDecorator.d.ts","sourceRoot":"","sources":["../../../src/Tools/MapFeatureInfoDecorator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuB,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACmB,eAAe,EAAE,SAAS,EAGxC,MAAM,sBAAsB,CAAC;AACzC,OAAO,EAAkC,OAAO,EAAE,OAAO,EAA+C,MAAM,sBAAsB,CAAC;AACrI,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAkG9D,gBAAgB;AAChB,qBAAa,uBAAwB,YAAW,SAAS;IAChD,MAAM,UAAS;IACtB,SAAgB,oBAAoB,QAAQ;IAC5C,SAAgB,oBAAoB,SAAS;IACtC,UAAU,UAAuB;IACjC,SAAS,SAAM;IAIf,kBAAkB,SAAS;IAI3B,oBAAoB,SAAM;IAEjC,OAAO,CAAC,eAAe,CAAmC;IAC1D,IAAW,cAAc,IACQ,QAAQ,CADkB;IAC3D,IAAW,cAAc,CAAC,KAAK,EAAE,QAAQ,EAGxC;IAED,IAAW,uBAAuB,WAAwtB;IAE1vB,OAAO,CAAC,cAAc,CAA0B;IAEhD,OAAO,CAAC,oBAAoB,CAA2B;IACvD,OAAO,CAAC,iBAAiB,CAA0B;IACnD,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,OAAO,CAAC,CAAwB;IACxC,OAAO,CAAC,YAAY,CAAmB;IACvC,OAAO,CAAC,UAAU,CAAsB;IAGjC,YAAY,EAAE,OAAO,EAAE,GAAC,SAAS,CAAC;IAEzC,OAAO,CAAC,KAAK,CAAqC;IAElD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA4B;;IAOzD,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,qBAAqB;IAWtB,SAAS,aAEd;IAEK,OAAO,SAAU,sBAAsB,UA2B5C;IAEF,OAAO,CAAC,kBAAkB;IAY1B,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe;IAyCjD,OAAO,CAAC,oBAAoB;IAiC5B,OAAO,CAAC,eAAe;IA+CvB,OAAO,CAAC,sBAAsB;IAkB9B,OAAO,CAAC,gBAAgB;IA4BjB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CAUhD"}
|
|
@@ -164,15 +164,14 @@ class MapFeatureInfoDecorator {
|
|
|
164
164
|
}
|
|
165
165
|
;
|
|
166
166
|
getGeometryTreeRef(vp) {
|
|
167
|
-
let treeRef;
|
|
168
167
|
if (vp.backgroundMapSettings.applyTerrain) {
|
|
169
|
-
vp.
|
|
170
|
-
if (
|
|
171
|
-
|
|
168
|
+
for (const ref of vp.mapTileTreeRefs) {
|
|
169
|
+
if (ref instanceof core_frontend_1.MapTileTreeReference) {
|
|
170
|
+
return ref.createGeometryTreeReference();
|
|
172
171
|
}
|
|
173
|
-
}
|
|
172
|
+
}
|
|
174
173
|
}
|
|
175
|
-
return
|
|
174
|
+
return undefined;
|
|
176
175
|
}
|
|
177
176
|
renderGraphics(context) {
|
|
178
177
|
this._markerSet.markers.clear();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapFeatureInfoDecorator.js","sourceRoot":"","sources":["../../../src/Tools/MapFeatureInfoDecorator.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,oDAAmE;AACnE,wDAI4D;AAC5D,wDAAqI;AAErI,mEAAgE;AAChE,sDAA6C;AAC7C,MAAM,cAAc,GAAG,0CAA0C,CAAC;AAElE,gBAAgB;AAChB,MAAM,SAAU,SAAQ,sBAAM;IAC5B,YAAmB,aAAqB,EAAE,IAAW,EAAE,KAAkB;QACvE,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,IAAI,uBAAO,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAC7D,CAAC;CACF;AAED,gBAAgB;AAChB,MAAM,gBAAiB,SAAQ,sBAAM;IACnC,kCAAkC;IAClC,YAAY,QAAgB,EAAE,IAAW,EAAE,OAA2B,EAAE,KAAqD;QAC3H,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAEtB,IAAI,CAAC,KAAK,GAAG,yBAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,iEAAiE,EAAE,EAAE,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,EAAC,CAAC,CAAC;QAElK,IAAI,CAAC,WAAW,GAAG,IAAI,uBAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;QAChD,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;QACrD,IAAI,CAAC,UAAU,GAAG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IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;oCACxC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM;wCACrC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;gCAC1F,CAAC;qCAAM,CAAC;oCACN,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gCACrC,CAAC;4BAEH,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;YAEH,CAAC;QAEH,CAAC;IACH,CAAC;IAEM,QAAQ,CAAC,OAAwB;QACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC9C,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;YACnD,yBAAS,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAC3C,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACvC,OAAO;IACT,CAAC;CACF;AAzSD,0DAySC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { Base64EncodedString, ColorDef } from \"@itwin/core-common\";\nimport {\n BeButtonEvent, Cluster, DecorateContext, Decorator,\n GeometryTileTreeReference, GraphicBuilder, GraphicPrimitive, GraphicType, IModelApp, MapTileTreeReference, Marker, MarkerImage, MarkerSet,\n ScreenViewport,\n TileTreeReference, Viewport } from \"@itwin/core-frontend\";\nimport { GrowableXYZArray, LineString3d, Point2d, Point3d, Polyface, Range3d, Transform, XAndY, XYAndZ } from \"@itwin/core-geometry\";\nimport { MapFeatureInfoToolData } from \"./MapFeatureInfoTool\";\nimport { GeometryTerrainDraper } from \"./GeometryTerrainDraper\";\nimport { Logger } from \"@itwin/core-bentley\";\nconst loggerCategory = \"MapLayersFormats.MapFeatureInfoDecorator\";\n\n/** @internal */\nclass PinMarker extends Marker {\n public constructor(worldLocation: XYAndZ, size: XAndY, image: MarkerImage) {\n super(worldLocation, size);\n this.image = image;\n this.imageOffset = new Point3d(0, Math.floor(size.y * .5));\n }\n}\n\n/** @internal */\nclass PinMarkerCluster extends Marker {\n /** Create a new cluster marker */\n constructor(location: XYAndZ, size: XAndY, cluster: Cluster<PinMarker>, image: MarkerImage | Promise<MarkerImage> | undefined) {\n super(location, size);\n\n this.title = IModelApp.localization.getLocalizedString(\"mapLayersFormats:Messages.MapFeatureInfoDecorator.clusterZoomIn\", { nbInstances: cluster.markers.length});\n\n this.imageOffset = new Point3d(0, size.y * 0.5);\n this.label = cluster.markers.length.toLocaleString();\n this.labelColor = \"black\";\n this.labelFont = \"bold 14px sans-serif\";\n\n if (image)\n this.setImage(image);\n }\n\n /** Show the cluster as a white circle with an outline */\n public override drawFunc(ctx: CanvasRenderingContext2D): void {\n ctx.beginPath();\n ctx.strokeStyle = \"#372528\";\n ctx.fillStyle = \"white\";\n ctx.lineWidth = 5;\n ctx.arc(0, 0, this.size.x * 0.5, 0, Math.PI * 2);\n ctx.fill();\n ctx.stroke();\n }\n\n public override onMouseButton(_ev: BeButtonEvent): boolean { return true; } // Don't allow clicks to be sent to active tool...\n}\n\n/** @internal */\nclass PinMarkerSet extends MarkerSet<PinMarker> {\n protected getClusterMarker(cluster: Cluster<PinMarker>): Marker {\n // No image passed to the cluster, we prefer to have the circle only\n return new PinMarkerCluster(cluster.getClusterLocation(), cluster.markers[0].size, cluster, undefined);\n }\n}\n\ninterface DrapeGraphicState {\n graphic: GraphicPrimitive;\n collectorState: string;\n chordTolerance: number;\n range: Range3d;\n}\n\nclass DrapedPrimitives {\n private _strings?: LineString3d[];\n private _meshes?: Polyface[];\n private _points = new GrowableXYZArray();\n\n public get strings() {\n return this._strings;\n }\n\n public get meshes() {\n return this._meshes;\n }\n\n public get points() {\n return this._points;\n }\n\n public clear() {\n this._strings = undefined;\n this._meshes = undefined;\n this._points.clear();\n }\n\n public addStrings(drapedStrings: LineString3d[]) {\n if (!this._strings) {\n this._strings = [];\n }\n for (const ds of drapedStrings)\n this._strings.push(ds);\n }\n\n public addMeshes(drapedMeshes: Polyface[]) {\n if (!this._meshes)\n this._meshes = [];\n drapedMeshes.forEach((ds) => this._meshes!.push(ds));\n }\n}\n\n/** @internal */\nexport class MapFeatureInfoDecorator implements Decorator {\n public hidden = false;\n public readonly useCachedDecorations = true;\n public readonly disableTerrainDraper = false;\n public markerSize = new Point2d(32, 32);\n public lineWidth = 3;\n\n // This is the maximum allowed size of a geometry, in pixels, to be draped.\n // If the value is too large, we will end up downloading tons of terrain tiles, and possibly hang for too long.\n public maxDrapeSizePixels = 50000;\n\n // This value controls the chord tolerance used to collect terrain tiles\n // at the \"right\" resolution. Higher values, will give coarser terrain tiles.\n public chordTolerancePixels = 20;\n\n private _highlightColor = ColorDef.from(0, 255, 255, 127);\n public get highlightColor() { return this._highlightColor;}\n public set highlightColor(color: ColorDef) {\n this.updateMarkerImage();\n this._highlightColor = color;\n }\n\n public get defaultMarkerIconSvgXml() { return `<svg class=\"indicator\" viewBox=\"0 0 22 22\" width=\"22\" height=\"22\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m11 0a7.44506 7.44506 0 0 0 -7.5 7.2875c0 1.65 1.132 4.2625 3.25477 8.1125 1.55652 2.75 4.24523 6.6 4.24523 6.6s2.68865-3.9875 4.24528-6.7375c2.12272-3.85 3.25472-6.4625 3.25472-8.1125a7.4215 7.4215 0 0 0 -7.5-7.15z\" fill=\"black\"/><path d=\"m11 1.01715a6.46476 6.46476 0 0 0 -6.48285 6.27033c0 1.72619 1.67181 4.97973 3.12836 7.62139.97564 1.7237 2.42828 3.92176 3.34118 5.27161.91413-1.39148 2.385-3.673 3.37336-5.41907 1.451-2.63171 3.1228-5.88525 3.1228-7.61139a6.39982 6.39982 0 0 0 -6.48285-6.13287zm.00183 8.98285a3 3 0 1 1 3-3 3 3 0 0 1 -3 3z\" fill=\"${this.highlightColor.toRgbString()}\"/></svg>`; }\n\n private _scratchPoints = new GrowableXYZArray();\n\n private _drapeGraphicsStates: DrapeGraphicState[] = [];\n private _drapedPrimitives = new DrapedPrimitives();\n private _allGeomDraped = false;\n private _draper?: GeometryTerrainDraper;\n private _markerImage: HTMLImageElement;\n private _markerSet = new PinMarkerSet();\n\n // Extra markers can be added outside the normal state\n public extraMarkers: Point3d[]|undefined;\n\n private _data: MapFeatureInfoToolData | undefined;\n\n private readonly _graphicType = GraphicType.WorldOverlay;\n\n public constructor() {\n this._markerImage = new Image();\n this.updateMarkerImage();\n }\n\n private updateMarkerImage() {\n const base64 = Base64EncodedString.encode(this.defaultMarkerIconSvgXml);\n this._markerImage.src = `data:image/svg+xml;base64,${base64}`;\n }\n\n private computePixelSize(viewport: Viewport, applyAspectRatioSkew: boolean, pointWorld: Point3d) {\n let pixelSize = 1;\n // Compute the horizontal distance in meters between two adjacent pixels at the center of the geometry.\n pixelSize = viewport.getPixelSizeAtPoint(pointWorld);\n pixelSize = viewport.target.adjustPixelSizeForLOD(pixelSize);\n\n // Aspect ratio skew > 1.0 stretches the view in Y. In that case use the smaller vertical pixel distance for our stroke tolerance.\n const skew = applyAspectRatioSkew ? viewport.view.getAspectRatioSkew() : 0;\n if (skew > 1)\n pixelSize /= skew;\n return pixelSize * 0.25;\n }\n\n private computeChordTolerance(viewport: Viewport, drapeRange: Range3d) {\n const drapeSizeWorld = Math.max(drapeRange.xLength(), drapeRange.yLength());\n const pixelSize = this.computePixelSize(viewport, true, drapeRange.center);\n const maxDrapeRangeSizeRatio = this.maxDrapeSizePixels / (drapeSizeWorld / pixelSize);\n if (maxDrapeRangeSizeRatio < 1) {\n Logger.logWarning(loggerCategory, \"Element too large; chord tolerance was adjusted\");\n return (pixelSize / maxDrapeRangeSizeRatio)*this.chordTolerancePixels;\n }\n return pixelSize*this.chordTolerancePixels;\n };\n\n public clearData = () => {\n this._data = undefined;\n };\n\n public setData = (data: MapFeatureInfoToolData) => {\n\n this._drapedPrimitives.clear();\n this._allGeomDraped = false;\n this.hidden = false;\n\n this._data = data;\n IModelApp.viewManager.invalidateCachedDecorationsAllViews(this);\n\n this._drapeGraphicsStates = [];\n\n if (!this.disableTerrainDraper && this._data.mapInfo?.layerInfos && data.hit.viewport.displayStyle.displayTerrain) {\n\n if (data.hit?.modelId) {\n const drapeTreeRef = this.getGeometryTreeRef(data.hit.viewport);\n if (drapeTreeRef) {\n this._draper = new GeometryTerrainDraper(data.hit.viewport, drapeTreeRef);\n return;\n }\n }\n }\n\n if (this._draper) {\n // Dispose draper every time?\n this._draper[Symbol.dispose]();\n this._draper = undefined;\n }\n };\n\n private getGeometryTreeRef(vp: Viewport): GeometryTileTreeReference | undefined {\n let treeRef: GeometryTileTreeReference | undefined;\n if (vp.backgroundMapSettings.applyTerrain) {\n vp.forEachMapTreeRef((ref: TileTreeReference) => {\n if (!treeRef && ref instanceof MapTileTreeReference) {\n treeRef = ref.createGeometryTreeReference();\n }\n });\n }\n\n return treeRef;\n }\n\n protected renderGraphics(context: DecorateContext) {\n this._markerSet.markers.clear();\n\n if (this._data?.mapInfo?.layerInfos === undefined || this.hidden) {\n return undefined;\n }\n\n let transform: Transform|undefined;\n const groundBias = context.viewport.displayStyle.backgroundMapSettings.groundBias;\n if (groundBias !== 0) {\n transform = Transform.createTranslationXYZ(0, 0 , groundBias);\n }\n const builder = context.createGraphicBuilder(this._graphicType, transform);\n\n if (this._draper) {\n this.initializeDrapeState(context.viewport);\n\n // We need to call drapeGeometries() until it returns true (i.e. fully complete)\n if (!this._allGeomDraped) {\n if (!this.drapeGeometries(context.viewport))\n return undefined;\n }\n\n this.appendDrapedGeometries(builder);\n } else {\n // Append geometries straight from the state to the builder\n this.appendGeometries(builder);\n }\n\n // Add extra markers if any specified\n if ( this.extraMarkers !== undefined) {\n this.extraMarkers.forEach((markerPoint)=> {\n builder.setSymbology(this.highlightColor, this.highlightColor, this.lineWidth);\n this._markerSet.markers.add(new PinMarker(markerPoint, this.markerSize, this._markerImage));\n });\n }\n\n return builder.finish();\n }\n\n // Iterates the mapfeatureinfo data and create a draping state for each entry\n private initializeDrapeState(viewport: ScreenViewport) {\n if (this._drapeGraphicsStates.length === 0) {\n const getGraphicRange = (graphic: GraphicPrimitive) => {\n if (graphic.type === \"linestring\")\n return Range3d.createArray(graphic.points);\n else if (graphic.type === \"loop\")\n return graphic.loop.range();\n else if (graphic.type === \"pointstring\")\n return Range3d.createArray(graphic.points);\n else\n return Range3d.createNull();\n };\n\n for (const layerInfo of this._data?.mapInfo?.layerInfos??[]) {\n for (const subLayerInfo of layerInfo?.subLayerInfos??[]) {\n for (const feature of subLayerInfo.features) {\n\n feature.geometries?.forEach(((geom)=> {\n const range = getGraphicRange(geom.graphic);\n this._drapeGraphicsStates.push({\n graphic: geom.graphic,\n collectorState: \"loading\",\n chordTolerance: this.computeChordTolerance(viewport, range),\n range,\n });\n } ));\n }\n }\n }\n }\n }\n\n // returns true when all geometries are fully draped; otherwise false\n private drapeGeometries(_viewport: ScreenViewport): boolean {\n if (!this._draper)\n return false;\n\n let hasMissingDrapeGeoms = false;\n for (const state of this._drapeGraphicsStates) {\n if (state.collectorState === \"loading\") {\n this._scratchPoints.clear();\n\n if (state.graphic.type === \"linestring\") {\n this._scratchPoints.pushAll(state.graphic.points);\n const drapedStrings: LineString3d[] = [];\n if (\"loading\" === this._draper.drapeLineString(drapedStrings, this._scratchPoints, state.chordTolerance, state.range)) {\n hasMissingDrapeGeoms = true;\n break;\n } else {\n this._drapedPrimitives.addStrings(drapedStrings);\n state.collectorState = \"complete\";\n }\n } else if (state.graphic.type === \"loop\") {\n const loop = state.graphic.loop;\n const outMeshes: Polyface[] = [];\n if (\"loading\" === this._draper.drapeLoop(outMeshes, loop, state.chordTolerance, state.range)) {\n hasMissingDrapeGeoms = true;\n break; // We drape each graphic sequentially, otherwise collector get messed up.\n } else {\n this._drapedPrimitives.addMeshes(outMeshes);\n state.collectorState = \"complete\";\n }\n } else if (state.graphic.type === \"pointstring\") {\n const outPoint = Point3d.createZero();\n for (const point of state.graphic.points) {\n if (\"loading\" === this._draper.drapePoint(outPoint, point, state.chordTolerance, state.range)) {\n this._allGeomDraped = false;\n return false;\n } else if (!outPoint.isZero) {\n this._drapedPrimitives.points.push(outPoint);\n }\n }\n }\n }\n }\n\n this._allGeomDraped = !hasMissingDrapeGeoms;\n return this._allGeomDraped;\n }\n\n private appendDrapedGeometries(builder: GraphicBuilder) {\n if (this._drapedPrimitives.strings) {\n builder.setSymbology(this.highlightColor, this.highlightColor, this.lineWidth);\n this._drapedPrimitives.strings.forEach((line) => builder.addLineString(line.points));\n }\n\n if (this._drapedPrimitives.meshes) {\n builder.setSymbology(this.highlightColor, this.highlightColor, this.lineWidth);\n this._drapedPrimitives.meshes.forEach((polyface) => builder.addPolyface(polyface, true));\n }\n\n if (this._drapedPrimitives.points.length > 0) {\n for (let i = 0; i < this._drapedPrimitives.points.length; i++) {\n this._markerSet.markers.add(new PinMarker(this._drapedPrimitives.points.getPoint3dAtUncheckedPointIndex(i), this.markerSize, this._markerImage));\n }\n }\n }\n\n private appendGeometries(builder: GraphicBuilder) {\n if (!this._data?.mapInfo?.layerInfos)\n return;\n\n builder.setSymbology(this.highlightColor, this.highlightColor, this.lineWidth);\n for (const layerInfo of this._data.mapInfo.layerInfos) {\n if (layerInfo.subLayerInfos && !(layerInfo.subLayerInfos instanceof HTMLElement)) {\n for (const subLayerInfo of layerInfo.subLayerInfos) {\n for (const feature of subLayerInfo.features) {\n if (feature.geometries) {\n for (const geom of feature.geometries) {\n if (geom.graphic.type === \"pointstring\") {\n for (const point of geom.graphic.points)\n this._markerSet.markers.add(new PinMarker(point, this.markerSize, this._markerImage));\n } else {\n builder.addPrimitive(geom.graphic);\n }\n\n }\n }\n }\n }\n\n }\n\n }\n }\n\n public decorate(context: DecorateContext): void {\n const graphics = this.renderGraphics(context);\n if (graphics) {\n context.addDecoration(this._graphicType, graphics);\n IModelApp.toolAdmin.setCursor(undefined);\n }\n\n this._markerSet.addDecoration(context);\n return;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"MapFeatureInfoDecorator.js","sourceRoot":"","sources":["../../../src/Tools/MapFeatureInfoDecorator.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,oDAAmE;AACnE,wDAIyC;AACzC,wDAAqI;AAErI,mEAAgE;AAChE,sDAA6C;AAC7C,MAAM,cAAc,GAAG,0CAA0C,CAAC;AAElE,gBAAgB;AAChB,MAAM,SAAU,SAAQ,sBAAM;IAC5B,YAAmB,aAAqB,EAAE,IAAW,EAAE,KAAkB;QACvE,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,IAAI,uBAAO,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAC7D,CAAC;CACF;AAED,gBAAgB;AAChB,MAAM,gBAAiB,SAAQ,sBAAM;IACnC,kCAAkC;IAClC,YAAY,QAAgB,EAAE,IAAW,EAAE,OAA2B,EAAE,KAAqD;QAC3H,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAEtB,IAAI,CAAC,KAAK,GAAG,yBAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,iEAAiE,EAAE,EAAE,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,EAAC,CAAC,CAAC;QAElK,IAAI,CAAC,WAAW,GAAG,IAAI,uBAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;QAChD,IAAI,CAAC,KA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,UAAU,EAAE,CAAC;gCACtC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;oCACxC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM;wCACrC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;gCAC1F,CAAC;qCAAM,CAAC;oCACN,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gCACrC,CAAC;4BAEH,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;YAEH,CAAC;QAEH,CAAC;IACH,CAAC;IAEM,QAAQ,CAAC,OAAwB;QACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC9C,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;YACnD,yBAAS,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAC3C,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACvC,OAAO;IACT,CAAC;CACF;AAxSD,0DAwSC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { Base64EncodedString, ColorDef } from \"@itwin/core-common\";\nimport {\n BeButtonEvent, Cluster, DecorateContext, Decorator,\n GeometryTileTreeReference, GraphicBuilder, GraphicPrimitive, GraphicType, IModelApp, MapTileTreeReference, Marker, MarkerImage, MarkerSet,\n ScreenViewport,\n Viewport } from \"@itwin/core-frontend\";\nimport { GrowableXYZArray, LineString3d, Point2d, Point3d, Polyface, Range3d, Transform, XAndY, XYAndZ } from \"@itwin/core-geometry\";\nimport { MapFeatureInfoToolData } from \"./MapFeatureInfoTool\";\nimport { GeometryTerrainDraper } from \"./GeometryTerrainDraper\";\nimport { Logger } from \"@itwin/core-bentley\";\nconst loggerCategory = \"MapLayersFormats.MapFeatureInfoDecorator\";\n\n/** @internal */\nclass PinMarker extends Marker {\n public constructor(worldLocation: XYAndZ, size: XAndY, image: MarkerImage) {\n super(worldLocation, size);\n this.image = image;\n this.imageOffset = new Point3d(0, Math.floor(size.y * .5));\n }\n}\n\n/** @internal */\nclass PinMarkerCluster extends Marker {\n /** Create a new cluster marker */\n constructor(location: XYAndZ, size: XAndY, cluster: Cluster<PinMarker>, image: MarkerImage | Promise<MarkerImage> | undefined) {\n super(location, size);\n\n this.title = IModelApp.localization.getLocalizedString(\"mapLayersFormats:Messages.MapFeatureInfoDecorator.clusterZoomIn\", { nbInstances: cluster.markers.length});\n\n this.imageOffset = new Point3d(0, size.y * 0.5);\n this.label = cluster.markers.length.toLocaleString();\n this.labelColor = \"black\";\n this.labelFont = \"bold 14px sans-serif\";\n\n if (image)\n this.setImage(image);\n }\n\n /** Show the cluster as a white circle with an outline */\n public override drawFunc(ctx: CanvasRenderingContext2D): void {\n ctx.beginPath();\n ctx.strokeStyle = \"#372528\";\n ctx.fillStyle = \"white\";\n ctx.lineWidth = 5;\n ctx.arc(0, 0, this.size.x * 0.5, 0, Math.PI * 2);\n ctx.fill();\n ctx.stroke();\n }\n\n public override onMouseButton(_ev: BeButtonEvent): boolean { return true; } // Don't allow clicks to be sent to active tool...\n}\n\n/** @internal */\nclass PinMarkerSet extends MarkerSet<PinMarker> {\n protected getClusterMarker(cluster: Cluster<PinMarker>): Marker {\n // No image passed to the cluster, we prefer to have the circle only\n return new PinMarkerCluster(cluster.getClusterLocation(), cluster.markers[0].size, cluster, undefined);\n }\n}\n\ninterface DrapeGraphicState {\n graphic: GraphicPrimitive;\n collectorState: string;\n chordTolerance: number;\n range: Range3d;\n}\n\nclass DrapedPrimitives {\n private _strings?: LineString3d[];\n private _meshes?: Polyface[];\n private _points = new GrowableXYZArray();\n\n public get strings() {\n return this._strings;\n }\n\n public get meshes() {\n return this._meshes;\n }\n\n public get points() {\n return this._points;\n }\n\n public clear() {\n this._strings = undefined;\n this._meshes = undefined;\n this._points.clear();\n }\n\n public addStrings(drapedStrings: LineString3d[]) {\n if (!this._strings) {\n this._strings = [];\n }\n for (const ds of drapedStrings)\n this._strings.push(ds);\n }\n\n public addMeshes(drapedMeshes: Polyface[]) {\n if (!this._meshes)\n this._meshes = [];\n drapedMeshes.forEach((ds) => this._meshes!.push(ds));\n }\n}\n\n/** @internal */\nexport class MapFeatureInfoDecorator implements Decorator {\n public hidden = false;\n public readonly useCachedDecorations = true;\n public readonly disableTerrainDraper = false;\n public markerSize = new Point2d(32, 32);\n public lineWidth = 3;\n\n // This is the maximum allowed size of a geometry, in pixels, to be draped.\n // If the value is too large, we will end up downloading tons of terrain tiles, and possibly hang for too long.\n public maxDrapeSizePixels = 50000;\n\n // This value controls the chord tolerance used to collect terrain tiles\n // at the \"right\" resolution. Higher values, will give coarser terrain tiles.\n public chordTolerancePixels = 20;\n\n private _highlightColor = ColorDef.from(0, 255, 255, 127);\n public get highlightColor() { return this._highlightColor;}\n public set highlightColor(color: ColorDef) {\n this.updateMarkerImage();\n this._highlightColor = color;\n }\n\n public get defaultMarkerIconSvgXml() { return `<svg class=\"indicator\" viewBox=\"0 0 22 22\" width=\"22\" height=\"22\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m11 0a7.44506 7.44506 0 0 0 -7.5 7.2875c0 1.65 1.132 4.2625 3.25477 8.1125 1.55652 2.75 4.24523 6.6 4.24523 6.6s2.68865-3.9875 4.24528-6.7375c2.12272-3.85 3.25472-6.4625 3.25472-8.1125a7.4215 7.4215 0 0 0 -7.5-7.15z\" fill=\"black\"/><path d=\"m11 1.01715a6.46476 6.46476 0 0 0 -6.48285 6.27033c0 1.72619 1.67181 4.97973 3.12836 7.62139.97564 1.7237 2.42828 3.92176 3.34118 5.27161.91413-1.39148 2.385-3.673 3.37336-5.41907 1.451-2.63171 3.1228-5.88525 3.1228-7.61139a6.39982 6.39982 0 0 0 -6.48285-6.13287zm.00183 8.98285a3 3 0 1 1 3-3 3 3 0 0 1 -3 3z\" fill=\"${this.highlightColor.toRgbString()}\"/></svg>`; }\n\n private _scratchPoints = new GrowableXYZArray();\n\n private _drapeGraphicsStates: DrapeGraphicState[] = [];\n private _drapedPrimitives = new DrapedPrimitives();\n private _allGeomDraped = false;\n private _draper?: GeometryTerrainDraper;\n private _markerImage: HTMLImageElement;\n private _markerSet = new PinMarkerSet();\n\n // Extra markers can be added outside the normal state\n public extraMarkers: Point3d[]|undefined;\n\n private _data: MapFeatureInfoToolData | undefined;\n\n private readonly _graphicType = GraphicType.WorldOverlay;\n\n public constructor() {\n this._markerImage = new Image();\n this.updateMarkerImage();\n }\n\n private updateMarkerImage() {\n const base64 = Base64EncodedString.encode(this.defaultMarkerIconSvgXml);\n this._markerImage.src = `data:image/svg+xml;base64,${base64}`;\n }\n\n private computePixelSize(viewport: Viewport, applyAspectRatioSkew: boolean, pointWorld: Point3d) {\n let pixelSize = 1;\n // Compute the horizontal distance in meters between two adjacent pixels at the center of the geometry.\n pixelSize = viewport.getPixelSizeAtPoint(pointWorld);\n pixelSize = viewport.target.adjustPixelSizeForLOD(pixelSize);\n\n // Aspect ratio skew > 1.0 stretches the view in Y. In that case use the smaller vertical pixel distance for our stroke tolerance.\n const skew = applyAspectRatioSkew ? viewport.view.getAspectRatioSkew() : 0;\n if (skew > 1)\n pixelSize /= skew;\n return pixelSize * 0.25;\n }\n\n private computeChordTolerance(viewport: Viewport, drapeRange: Range3d) {\n const drapeSizeWorld = Math.max(drapeRange.xLength(), drapeRange.yLength());\n const pixelSize = this.computePixelSize(viewport, true, drapeRange.center);\n const maxDrapeRangeSizeRatio = this.maxDrapeSizePixels / (drapeSizeWorld / pixelSize);\n if (maxDrapeRangeSizeRatio < 1) {\n Logger.logWarning(loggerCategory, \"Element too large; chord tolerance was adjusted\");\n return (pixelSize / maxDrapeRangeSizeRatio)*this.chordTolerancePixels;\n }\n return pixelSize*this.chordTolerancePixels;\n };\n\n public clearData = () => {\n this._data = undefined;\n };\n\n public setData = (data: MapFeatureInfoToolData) => {\n\n this._drapedPrimitives.clear();\n this._allGeomDraped = false;\n this.hidden = false;\n\n this._data = data;\n IModelApp.viewManager.invalidateCachedDecorationsAllViews(this);\n\n this._drapeGraphicsStates = [];\n\n if (!this.disableTerrainDraper && this._data.mapInfo?.layerInfos && data.hit.viewport.displayStyle.displayTerrain) {\n\n if (data.hit?.modelId) {\n const drapeTreeRef = this.getGeometryTreeRef(data.hit.viewport);\n if (drapeTreeRef) {\n this._draper = new GeometryTerrainDraper(data.hit.viewport, drapeTreeRef);\n return;\n }\n }\n }\n\n if (this._draper) {\n // Dispose draper every time?\n this._draper[Symbol.dispose]();\n this._draper = undefined;\n }\n };\n\n private getGeometryTreeRef(vp: Viewport): GeometryTileTreeReference | undefined {\n if (vp.backgroundMapSettings.applyTerrain) {\n for (const ref of vp.mapTileTreeRefs) {\n if (ref instanceof MapTileTreeReference) {\n return ref.createGeometryTreeReference();\n }\n }\n }\n\n return undefined;\n }\n\n protected renderGraphics(context: DecorateContext) {\n this._markerSet.markers.clear();\n\n if (this._data?.mapInfo?.layerInfos === undefined || this.hidden) {\n return undefined;\n }\n\n let transform: Transform|undefined;\n const groundBias = context.viewport.displayStyle.backgroundMapSettings.groundBias;\n if (groundBias !== 0) {\n transform = Transform.createTranslationXYZ(0, 0 , groundBias);\n }\n const builder = context.createGraphicBuilder(this._graphicType, transform);\n\n if (this._draper) {\n this.initializeDrapeState(context.viewport);\n\n // We need to call drapeGeometries() until it returns true (i.e. fully complete)\n if (!this._allGeomDraped) {\n if (!this.drapeGeometries(context.viewport))\n return undefined;\n }\n\n this.appendDrapedGeometries(builder);\n } else {\n // Append geometries straight from the state to the builder\n this.appendGeometries(builder);\n }\n\n // Add extra markers if any specified\n if ( this.extraMarkers !== undefined) {\n this.extraMarkers.forEach((markerPoint)=> {\n builder.setSymbology(this.highlightColor, this.highlightColor, this.lineWidth);\n this._markerSet.markers.add(new PinMarker(markerPoint, this.markerSize, this._markerImage));\n });\n }\n\n return builder.finish();\n }\n\n // Iterates the mapfeatureinfo data and create a draping state for each entry\n private initializeDrapeState(viewport: ScreenViewport) {\n if (this._drapeGraphicsStates.length === 0) {\n const getGraphicRange = (graphic: GraphicPrimitive) => {\n if (graphic.type === \"linestring\")\n return Range3d.createArray(graphic.points);\n else if (graphic.type === \"loop\")\n return graphic.loop.range();\n else if (graphic.type === \"pointstring\")\n return Range3d.createArray(graphic.points);\n else\n return Range3d.createNull();\n };\n\n for (const layerInfo of this._data?.mapInfo?.layerInfos??[]) {\n for (const subLayerInfo of layerInfo?.subLayerInfos??[]) {\n for (const feature of subLayerInfo.features) {\n\n feature.geometries?.forEach(((geom)=> {\n const range = getGraphicRange(geom.graphic);\n this._drapeGraphicsStates.push({\n graphic: geom.graphic,\n collectorState: \"loading\",\n chordTolerance: this.computeChordTolerance(viewport, range),\n range,\n });\n } ));\n }\n }\n }\n }\n }\n\n // returns true when all geometries are fully draped; otherwise false\n private drapeGeometries(_viewport: ScreenViewport): boolean {\n if (!this._draper)\n return false;\n\n let hasMissingDrapeGeoms = false;\n for (const state of this._drapeGraphicsStates) {\n if (state.collectorState === \"loading\") {\n this._scratchPoints.clear();\n\n if (state.graphic.type === \"linestring\") {\n this._scratchPoints.pushAll(state.graphic.points);\n const drapedStrings: LineString3d[] = [];\n if (\"loading\" === this._draper.drapeLineString(drapedStrings, this._scratchPoints, state.chordTolerance, state.range)) {\n hasMissingDrapeGeoms = true;\n break;\n } else {\n this._drapedPrimitives.addStrings(drapedStrings);\n state.collectorState = \"complete\";\n }\n } else if (state.graphic.type === \"loop\") {\n const loop = state.graphic.loop;\n const outMeshes: Polyface[] = [];\n if (\"loading\" === this._draper.drapeLoop(outMeshes, loop, state.chordTolerance, state.range)) {\n hasMissingDrapeGeoms = true;\n break; // We drape each graphic sequentially, otherwise collector get messed up.\n } else {\n this._drapedPrimitives.addMeshes(outMeshes);\n state.collectorState = \"complete\";\n }\n } else if (state.graphic.type === \"pointstring\") {\n const outPoint = Point3d.createZero();\n for (const point of state.graphic.points) {\n if (\"loading\" === this._draper.drapePoint(outPoint, point, state.chordTolerance, state.range)) {\n this._allGeomDraped = false;\n return false;\n } else if (!outPoint.isZero) {\n this._drapedPrimitives.points.push(outPoint);\n }\n }\n }\n }\n }\n\n this._allGeomDraped = !hasMissingDrapeGeoms;\n return this._allGeomDraped;\n }\n\n private appendDrapedGeometries(builder: GraphicBuilder) {\n if (this._drapedPrimitives.strings) {\n builder.setSymbology(this.highlightColor, this.highlightColor, this.lineWidth);\n this._drapedPrimitives.strings.forEach((line) => builder.addLineString(line.points));\n }\n\n if (this._drapedPrimitives.meshes) {\n builder.setSymbology(this.highlightColor, this.highlightColor, this.lineWidth);\n this._drapedPrimitives.meshes.forEach((polyface) => builder.addPolyface(polyface, true));\n }\n\n if (this._drapedPrimitives.points.length > 0) {\n for (let i = 0; i < this._drapedPrimitives.points.length; i++) {\n this._markerSet.markers.add(new PinMarker(this._drapedPrimitives.points.getPoint3dAtUncheckedPointIndex(i), this.markerSize, this._markerImage));\n }\n }\n }\n\n private appendGeometries(builder: GraphicBuilder) {\n if (!this._data?.mapInfo?.layerInfos)\n return;\n\n builder.setSymbology(this.highlightColor, this.highlightColor, this.lineWidth);\n for (const layerInfo of this._data.mapInfo.layerInfos) {\n if (layerInfo.subLayerInfos && !(layerInfo.subLayerInfos instanceof HTMLElement)) {\n for (const subLayerInfo of layerInfo.subLayerInfos) {\n for (const feature of subLayerInfo.features) {\n if (feature.geometries) {\n for (const geom of feature.geometries) {\n if (geom.graphic.type === \"pointstring\") {\n for (const point of geom.graphic.points)\n this._markerSet.markers.add(new PinMarker(point, this.markerSize, this._markerImage));\n } else {\n builder.addPrimitive(geom.graphic);\n }\n\n }\n }\n }\n }\n\n }\n\n }\n }\n\n public decorate(context: DecorateContext): void {\n const graphics = this.renderGraphics(context);\n if (graphics) {\n context.addDecoration(this._graphicType, graphics);\n IModelApp.toolAdmin.setCursor(undefined);\n }\n\n this._markerSet.addDecoration(context);\n return;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapFeatureInfoDecorator.d.ts","sourceRoot":"","sources":["../../../src/Tools/MapFeatureInfoDecorator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuB,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACmB,eAAe,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"MapFeatureInfoDecorator.d.ts","sourceRoot":"","sources":["../../../src/Tools/MapFeatureInfoDecorator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuB,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACmB,eAAe,EAAE,SAAS,EAGxC,MAAM,sBAAsB,CAAC;AACzC,OAAO,EAAkC,OAAO,EAAE,OAAO,EAA+C,MAAM,sBAAsB,CAAC;AACrI,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAkG9D,gBAAgB;AAChB,qBAAa,uBAAwB,YAAW,SAAS;IAChD,MAAM,UAAS;IACtB,SAAgB,oBAAoB,QAAQ;IAC5C,SAAgB,oBAAoB,SAAS;IACtC,UAAU,UAAuB;IACjC,SAAS,SAAM;IAIf,kBAAkB,SAAS;IAI3B,oBAAoB,SAAM;IAEjC,OAAO,CAAC,eAAe,CAAmC;IAC1D,IAAW,cAAc,IACQ,QAAQ,CADkB;IAC3D,IAAW,cAAc,CAAC,KAAK,EAAE,QAAQ,EAGxC;IAED,IAAW,uBAAuB,WAAwtB;IAE1vB,OAAO,CAAC,cAAc,CAA0B;IAEhD,OAAO,CAAC,oBAAoB,CAA2B;IACvD,OAAO,CAAC,iBAAiB,CAA0B;IACnD,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,OAAO,CAAC,CAAwB;IACxC,OAAO,CAAC,YAAY,CAAmB;IACvC,OAAO,CAAC,UAAU,CAAsB;IAGjC,YAAY,EAAE,OAAO,EAAE,GAAC,SAAS,CAAC;IAEzC,OAAO,CAAC,KAAK,CAAqC;IAElD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA4B;;IAOzD,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,qBAAqB;IAWtB,SAAS,aAEd;IAEK,OAAO,SAAU,sBAAsB,UA2B5C;IAEF,OAAO,CAAC,kBAAkB;IAY1B,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe;IAyCjD,OAAO,CAAC,oBAAoB;IAiC5B,OAAO,CAAC,eAAe;IA+CvB,OAAO,CAAC,sBAAsB;IAkB9B,OAAO,CAAC,gBAAgB;IA4BjB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CAUhD"}
|
|
@@ -161,15 +161,14 @@ export class MapFeatureInfoDecorator {
|
|
|
161
161
|
}
|
|
162
162
|
;
|
|
163
163
|
getGeometryTreeRef(vp) {
|
|
164
|
-
let treeRef;
|
|
165
164
|
if (vp.backgroundMapSettings.applyTerrain) {
|
|
166
|
-
vp.
|
|
167
|
-
if (
|
|
168
|
-
|
|
165
|
+
for (const ref of vp.mapTileTreeRefs) {
|
|
166
|
+
if (ref instanceof MapTileTreeReference) {
|
|
167
|
+
return ref.createGeometryTreeReference();
|
|
169
168
|
}
|
|
170
|
-
}
|
|
169
|
+
}
|
|
171
170
|
}
|
|
172
|
-
return
|
|
171
|
+
return undefined;
|
|
173
172
|
}
|
|
174
173
|
renderGraphics(context) {
|
|
175
174
|
this._markerSet.markers.clear();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapFeatureInfoDecorator.js","sourceRoot":"","sources":["../../../src/Tools/MapFeatureInfoDecorator.ts"],"names":[],"mappings":"AAAA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MAAM,IAAI,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;gCACtC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;oCACxC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM;wCACrC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;gCAC1F,CAAC;qCAAM,CAAC;oCACN,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gCACrC,CAAC;4BAEH,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;YAEH,CAAC;QAEH,CAAC;IACH,CAAC;IAEM,QAAQ,CAAC,OAAwB;QACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC9C,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;YACnD,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAC3C,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACvC,OAAO;IACT,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { Base64EncodedString, ColorDef } from \"@itwin/core-common\";\nimport {\n BeButtonEvent, Cluster, DecorateContext, Decorator,\n GeometryTileTreeReference, GraphicBuilder, GraphicPrimitive, GraphicType, IModelApp, MapTileTreeReference, Marker, MarkerImage, MarkerSet,\n ScreenViewport,\n TileTreeReference, Viewport } from \"@itwin/core-frontend\";\nimport { GrowableXYZArray, LineString3d, Point2d, Point3d, Polyface, Range3d, Transform, XAndY, XYAndZ } from \"@itwin/core-geometry\";\nimport { MapFeatureInfoToolData } from \"./MapFeatureInfoTool\";\nimport { GeometryTerrainDraper } from \"./GeometryTerrainDraper\";\nimport { Logger } from \"@itwin/core-bentley\";\nconst loggerCategory = \"MapLayersFormats.MapFeatureInfoDecorator\";\n\n/** @internal */\nclass PinMarker extends Marker {\n public constructor(worldLocation: XYAndZ, size: XAndY, image: MarkerImage) {\n super(worldLocation, size);\n this.image = image;\n this.imageOffset = new Point3d(0, Math.floor(size.y * .5));\n }\n}\n\n/** @internal */\nclass PinMarkerCluster extends Marker {\n /** Create a new cluster marker */\n constructor(location: XYAndZ, size: XAndY, cluster: Cluster<PinMarker>, image: MarkerImage | Promise<MarkerImage> | undefined) {\n super(location, size);\n\n this.title = IModelApp.localization.getLocalizedString(\"mapLayersFormats:Messages.MapFeatureInfoDecorator.clusterZoomIn\", { nbInstances: cluster.markers.length});\n\n this.imageOffset = new Point3d(0, size.y * 0.5);\n this.label = cluster.markers.length.toLocaleString();\n this.labelColor = \"black\";\n this.labelFont = \"bold 14px sans-serif\";\n\n if (image)\n this.setImage(image);\n }\n\n /** Show the cluster as a white circle with an outline */\n public override drawFunc(ctx: CanvasRenderingContext2D): void {\n ctx.beginPath();\n ctx.strokeStyle = \"#372528\";\n ctx.fillStyle = \"white\";\n ctx.lineWidth = 5;\n ctx.arc(0, 0, this.size.x * 0.5, 0, Math.PI * 2);\n ctx.fill();\n ctx.stroke();\n }\n\n public override onMouseButton(_ev: BeButtonEvent): boolean { return true; } // Don't allow clicks to be sent to active tool...\n}\n\n/** @internal */\nclass PinMarkerSet extends MarkerSet<PinMarker> {\n protected getClusterMarker(cluster: Cluster<PinMarker>): Marker {\n // No image passed to the cluster, we prefer to have the circle only\n return new PinMarkerCluster(cluster.getClusterLocation(), cluster.markers[0].size, cluster, undefined);\n }\n}\n\ninterface DrapeGraphicState {\n graphic: GraphicPrimitive;\n collectorState: string;\n chordTolerance: number;\n range: Range3d;\n}\n\nclass DrapedPrimitives {\n private _strings?: LineString3d[];\n private _meshes?: Polyface[];\n private _points = new GrowableXYZArray();\n\n public get strings() {\n return this._strings;\n }\n\n public get meshes() {\n return this._meshes;\n }\n\n public get points() {\n return this._points;\n }\n\n public clear() {\n this._strings = undefined;\n this._meshes = undefined;\n this._points.clear();\n }\n\n public addStrings(drapedStrings: LineString3d[]) {\n if (!this._strings) {\n this._strings = [];\n }\n for (const ds of drapedStrings)\n this._strings.push(ds);\n }\n\n public addMeshes(drapedMeshes: Polyface[]) {\n if (!this._meshes)\n this._meshes = [];\n drapedMeshes.forEach((ds) => this._meshes!.push(ds));\n }\n}\n\n/** @internal */\nexport class MapFeatureInfoDecorator implements Decorator {\n public hidden = false;\n public readonly useCachedDecorations = true;\n public readonly disableTerrainDraper = false;\n public markerSize = new Point2d(32, 32);\n public lineWidth = 3;\n\n // This is the maximum allowed size of a geometry, in pixels, to be draped.\n // If the value is too large, we will end up downloading tons of terrain tiles, and possibly hang for too long.\n public maxDrapeSizePixels = 50000;\n\n // This value controls the chord tolerance used to collect terrain tiles\n // at the \"right\" resolution. Higher values, will give coarser terrain tiles.\n public chordTolerancePixels = 20;\n\n private _highlightColor = ColorDef.from(0, 255, 255, 127);\n public get highlightColor() { return this._highlightColor;}\n public set highlightColor(color: ColorDef) {\n this.updateMarkerImage();\n this._highlightColor = color;\n }\n\n public get defaultMarkerIconSvgXml() { return `<svg class=\"indicator\" viewBox=\"0 0 22 22\" width=\"22\" height=\"22\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m11 0a7.44506 7.44506 0 0 0 -7.5 7.2875c0 1.65 1.132 4.2625 3.25477 8.1125 1.55652 2.75 4.24523 6.6 4.24523 6.6s2.68865-3.9875 4.24528-6.7375c2.12272-3.85 3.25472-6.4625 3.25472-8.1125a7.4215 7.4215 0 0 0 -7.5-7.15z\" fill=\"black\"/><path d=\"m11 1.01715a6.46476 6.46476 0 0 0 -6.48285 6.27033c0 1.72619 1.67181 4.97973 3.12836 7.62139.97564 1.7237 2.42828 3.92176 3.34118 5.27161.91413-1.39148 2.385-3.673 3.37336-5.41907 1.451-2.63171 3.1228-5.88525 3.1228-7.61139a6.39982 6.39982 0 0 0 -6.48285-6.13287zm.00183 8.98285a3 3 0 1 1 3-3 3 3 0 0 1 -3 3z\" fill=\"${this.highlightColor.toRgbString()}\"/></svg>`; }\n\n private _scratchPoints = new GrowableXYZArray();\n\n private _drapeGraphicsStates: DrapeGraphicState[] = [];\n private _drapedPrimitives = new DrapedPrimitives();\n private _allGeomDraped = false;\n private _draper?: GeometryTerrainDraper;\n private _markerImage: HTMLImageElement;\n private _markerSet = new PinMarkerSet();\n\n // Extra markers can be added outside the normal state\n public extraMarkers: Point3d[]|undefined;\n\n private _data: MapFeatureInfoToolData | undefined;\n\n private readonly _graphicType = GraphicType.WorldOverlay;\n\n public constructor() {\n this._markerImage = new Image();\n this.updateMarkerImage();\n }\n\n private updateMarkerImage() {\n const base64 = Base64EncodedString.encode(this.defaultMarkerIconSvgXml);\n this._markerImage.src = `data:image/svg+xml;base64,${base64}`;\n }\n\n private computePixelSize(viewport: Viewport, applyAspectRatioSkew: boolean, pointWorld: Point3d) {\n let pixelSize = 1;\n // Compute the horizontal distance in meters between two adjacent pixels at the center of the geometry.\n pixelSize = viewport.getPixelSizeAtPoint(pointWorld);\n pixelSize = viewport.target.adjustPixelSizeForLOD(pixelSize);\n\n // Aspect ratio skew > 1.0 stretches the view in Y. In that case use the smaller vertical pixel distance for our stroke tolerance.\n const skew = applyAspectRatioSkew ? viewport.view.getAspectRatioSkew() : 0;\n if (skew > 1)\n pixelSize /= skew;\n return pixelSize * 0.25;\n }\n\n private computeChordTolerance(viewport: Viewport, drapeRange: Range3d) {\n const drapeSizeWorld = Math.max(drapeRange.xLength(), drapeRange.yLength());\n const pixelSize = this.computePixelSize(viewport, true, drapeRange.center);\n const maxDrapeRangeSizeRatio = this.maxDrapeSizePixels / (drapeSizeWorld / pixelSize);\n if (maxDrapeRangeSizeRatio < 1) {\n Logger.logWarning(loggerCategory, \"Element too large; chord tolerance was adjusted\");\n return (pixelSize / maxDrapeRangeSizeRatio)*this.chordTolerancePixels;\n }\n return pixelSize*this.chordTolerancePixels;\n };\n\n public clearData = () => {\n this._data = undefined;\n };\n\n public setData = (data: MapFeatureInfoToolData) => {\n\n this._drapedPrimitives.clear();\n this._allGeomDraped = false;\n this.hidden = false;\n\n this._data = data;\n IModelApp.viewManager.invalidateCachedDecorationsAllViews(this);\n\n this._drapeGraphicsStates = [];\n\n if (!this.disableTerrainDraper && this._data.mapInfo?.layerInfos && data.hit.viewport.displayStyle.displayTerrain) {\n\n if (data.hit?.modelId) {\n const drapeTreeRef = this.getGeometryTreeRef(data.hit.viewport);\n if (drapeTreeRef) {\n this._draper = new GeometryTerrainDraper(data.hit.viewport, drapeTreeRef);\n return;\n }\n }\n }\n\n if (this._draper) {\n // Dispose draper every time?\n this._draper[Symbol.dispose]();\n this._draper = undefined;\n }\n };\n\n private getGeometryTreeRef(vp: Viewport): GeometryTileTreeReference | undefined {\n let treeRef: GeometryTileTreeReference | undefined;\n if (vp.backgroundMapSettings.applyTerrain) {\n vp.forEachMapTreeRef((ref: TileTreeReference) => {\n if (!treeRef && ref instanceof MapTileTreeReference) {\n treeRef = ref.createGeometryTreeReference();\n }\n });\n }\n\n return treeRef;\n }\n\n protected renderGraphics(context: DecorateContext) {\n this._markerSet.markers.clear();\n\n if (this._data?.mapInfo?.layerInfos === undefined || this.hidden) {\n return undefined;\n }\n\n let transform: Transform|undefined;\n const groundBias = context.viewport.displayStyle.backgroundMapSettings.groundBias;\n if (groundBias !== 0) {\n transform = Transform.createTranslationXYZ(0, 0 , groundBias);\n }\n const builder = context.createGraphicBuilder(this._graphicType, transform);\n\n if (this._draper) {\n this.initializeDrapeState(context.viewport);\n\n // We need to call drapeGeometries() until it returns true (i.e. fully complete)\n if (!this._allGeomDraped) {\n if (!this.drapeGeometries(context.viewport))\n return undefined;\n }\n\n this.appendDrapedGeometries(builder);\n } else {\n // Append geometries straight from the state to the builder\n this.appendGeometries(builder);\n }\n\n // Add extra markers if any specified\n if ( this.extraMarkers !== undefined) {\n this.extraMarkers.forEach((markerPoint)=> {\n builder.setSymbology(this.highlightColor, this.highlightColor, this.lineWidth);\n this._markerSet.markers.add(new PinMarker(markerPoint, this.markerSize, this._markerImage));\n });\n }\n\n return builder.finish();\n }\n\n // Iterates the mapfeatureinfo data and create a draping state for each entry\n private initializeDrapeState(viewport: ScreenViewport) {\n if (this._drapeGraphicsStates.length === 0) {\n const getGraphicRange = (graphic: GraphicPrimitive) => {\n if (graphic.type === \"linestring\")\n return Range3d.createArray(graphic.points);\n else if (graphic.type === \"loop\")\n return graphic.loop.range();\n else if (graphic.type === \"pointstring\")\n return Range3d.createArray(graphic.points);\n else\n return Range3d.createNull();\n };\n\n for (const layerInfo of this._data?.mapInfo?.layerInfos??[]) {\n for (const subLayerInfo of layerInfo?.subLayerInfos??[]) {\n for (const feature of subLayerInfo.features) {\n\n feature.geometries?.forEach(((geom)=> {\n const range = getGraphicRange(geom.graphic);\n this._drapeGraphicsStates.push({\n graphic: geom.graphic,\n collectorState: \"loading\",\n chordTolerance: this.computeChordTolerance(viewport, range),\n range,\n });\n } ));\n }\n }\n }\n }\n }\n\n // returns true when all geometries are fully draped; otherwise false\n private drapeGeometries(_viewport: ScreenViewport): boolean {\n if (!this._draper)\n return false;\n\n let hasMissingDrapeGeoms = false;\n for (const state of this._drapeGraphicsStates) {\n if (state.collectorState === \"loading\") {\n this._scratchPoints.clear();\n\n if (state.graphic.type === \"linestring\") {\n this._scratchPoints.pushAll(state.graphic.points);\n const drapedStrings: LineString3d[] = [];\n if (\"loading\" === this._draper.drapeLineString(drapedStrings, this._scratchPoints, state.chordTolerance, state.range)) {\n hasMissingDrapeGeoms = true;\n break;\n } else {\n this._drapedPrimitives.addStrings(drapedStrings);\n state.collectorState = \"complete\";\n }\n } else if (state.graphic.type === \"loop\") {\n const loop = state.graphic.loop;\n const outMeshes: Polyface[] = [];\n if (\"loading\" === this._draper.drapeLoop(outMeshes, loop, state.chordTolerance, state.range)) {\n hasMissingDrapeGeoms = true;\n break; // We drape each graphic sequentially, otherwise collector get messed up.\n } else {\n this._drapedPrimitives.addMeshes(outMeshes);\n state.collectorState = \"complete\";\n }\n } else if (state.graphic.type === \"pointstring\") {\n const outPoint = Point3d.createZero();\n for (const point of state.graphic.points) {\n if (\"loading\" === this._draper.drapePoint(outPoint, point, state.chordTolerance, state.range)) {\n this._allGeomDraped = false;\n return false;\n } else if (!outPoint.isZero) {\n this._drapedPrimitives.points.push(outPoint);\n }\n }\n }\n }\n }\n\n this._allGeomDraped = !hasMissingDrapeGeoms;\n return this._allGeomDraped;\n }\n\n private appendDrapedGeometries(builder: GraphicBuilder) {\n if (this._drapedPrimitives.strings) {\n builder.setSymbology(this.highlightColor, this.highlightColor, this.lineWidth);\n this._drapedPrimitives.strings.forEach((line) => builder.addLineString(line.points));\n }\n\n if (this._drapedPrimitives.meshes) {\n builder.setSymbology(this.highlightColor, this.highlightColor, this.lineWidth);\n this._drapedPrimitives.meshes.forEach((polyface) => builder.addPolyface(polyface, true));\n }\n\n if (this._drapedPrimitives.points.length > 0) {\n for (let i = 0; i < this._drapedPrimitives.points.length; i++) {\n this._markerSet.markers.add(new PinMarker(this._drapedPrimitives.points.getPoint3dAtUncheckedPointIndex(i), this.markerSize, this._markerImage));\n }\n }\n }\n\n private appendGeometries(builder: GraphicBuilder) {\n if (!this._data?.mapInfo?.layerInfos)\n return;\n\n builder.setSymbology(this.highlightColor, this.highlightColor, this.lineWidth);\n for (const layerInfo of this._data.mapInfo.layerInfos) {\n if (layerInfo.subLayerInfos && !(layerInfo.subLayerInfos instanceof HTMLElement)) {\n for (const subLayerInfo of layerInfo.subLayerInfos) {\n for (const feature of subLayerInfo.features) {\n if (feature.geometries) {\n for (const geom of feature.geometries) {\n if (geom.graphic.type === \"pointstring\") {\n for (const point of geom.graphic.points)\n this._markerSet.markers.add(new PinMarker(point, this.markerSize, this._markerImage));\n } else {\n builder.addPrimitive(geom.graphic);\n }\n\n }\n }\n }\n }\n\n }\n\n }\n }\n\n public decorate(context: DecorateContext): void {\n const graphics = this.renderGraphics(context);\n if (graphics) {\n context.addDecoration(this._graphicType, graphics);\n IModelApp.toolAdmin.setCursor(undefined);\n }\n\n this._markerSet.addDecoration(context);\n return;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"MapFeatureInfoDecorator.js","sourceRoot":"","sources":["../../../src/Tools/MapFeatureInfoDecorator.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAEwD,WAAW,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,EAAe,SAAS,EAE/H,MAAM,sBAAsB,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAgB,OAAO,EAAE,OAAO,EAAY,OAAO,EAAE,SAAS,EAAiB,MAAM,sBAAsB,CAAC;AAErI,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,MAAM,cAAc,GAAG,0CAA0C,CAAC;AAElE,gBAAgB;AAChB,MAAM,SAAU,SAAQ,MAAM;IAC5B,YAAmB,aAAqB,EAAE,IAAW,EAAE,KAAkB;QACvE,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAC7D,CAAC;CACF;AAED,gBAAgB;AAChB,MAAM,gBAAiB,SAAQ,MAAM;IACnC,kCAAkC;IAClC,YAAY,QAAgB,EAAE,IAAW,EAAE,OA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AO,CAAC,UAAU,EAAE,CAAC;YACtD,IAAI,SAAS,CAAC,aAAa,IAAI,CAAC,CAAC,SAAS,CAAC,aAAa,YAAY,WAAW,CAAC,EAAE,CAAC;gBACjF,KAAK,MAAM,YAAY,IAAI,SAAS,CAAC,aAAa,EAAE,CAAC;oBACnD,KAAK,MAAM,OAAO,IAAI,YAAY,CAAC,QAAQ,EAAE,CAAC;wBAC5C,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;4BACvB,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;gCACtC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;oCACxC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM;wCACrC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;gCAC1F,CAAC;qCAAM,CAAC;oCACN,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gCACrC,CAAC;4BAEH,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;YAEH,CAAC;QAEH,CAAC;IACH,CAAC;IAEM,QAAQ,CAAC,OAAwB;QACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC9C,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;YACnD,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAC3C,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACvC,OAAO;IACT,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { Base64EncodedString, ColorDef } from \"@itwin/core-common\";\nimport {\n BeButtonEvent, Cluster, DecorateContext, Decorator,\n GeometryTileTreeReference, GraphicBuilder, GraphicPrimitive, GraphicType, IModelApp, MapTileTreeReference, Marker, MarkerImage, MarkerSet,\n ScreenViewport,\n Viewport } from \"@itwin/core-frontend\";\nimport { GrowableXYZArray, LineString3d, Point2d, Point3d, Polyface, Range3d, Transform, XAndY, XYAndZ } from \"@itwin/core-geometry\";\nimport { MapFeatureInfoToolData } from \"./MapFeatureInfoTool\";\nimport { GeometryTerrainDraper } from \"./GeometryTerrainDraper\";\nimport { Logger } from \"@itwin/core-bentley\";\nconst loggerCategory = \"MapLayersFormats.MapFeatureInfoDecorator\";\n\n/** @internal */\nclass PinMarker extends Marker {\n public constructor(worldLocation: XYAndZ, size: XAndY, image: MarkerImage) {\n super(worldLocation, size);\n this.image = image;\n this.imageOffset = new Point3d(0, Math.floor(size.y * .5));\n }\n}\n\n/** @internal */\nclass PinMarkerCluster extends Marker {\n /** Create a new cluster marker */\n constructor(location: XYAndZ, size: XAndY, cluster: Cluster<PinMarker>, image: MarkerImage | Promise<MarkerImage> | undefined) {\n super(location, size);\n\n this.title = IModelApp.localization.getLocalizedString(\"mapLayersFormats:Messages.MapFeatureInfoDecorator.clusterZoomIn\", { nbInstances: cluster.markers.length});\n\n this.imageOffset = new Point3d(0, size.y * 0.5);\n this.label = cluster.markers.length.toLocaleString();\n this.labelColor = \"black\";\n this.labelFont = \"bold 14px sans-serif\";\n\n if (image)\n this.setImage(image);\n }\n\n /** Show the cluster as a white circle with an outline */\n public override drawFunc(ctx: CanvasRenderingContext2D): void {\n ctx.beginPath();\n ctx.strokeStyle = \"#372528\";\n ctx.fillStyle = \"white\";\n ctx.lineWidth = 5;\n ctx.arc(0, 0, this.size.x * 0.5, 0, Math.PI * 2);\n ctx.fill();\n ctx.stroke();\n }\n\n public override onMouseButton(_ev: BeButtonEvent): boolean { return true; } // Don't allow clicks to be sent to active tool...\n}\n\n/** @internal */\nclass PinMarkerSet extends MarkerSet<PinMarker> {\n protected getClusterMarker(cluster: Cluster<PinMarker>): Marker {\n // No image passed to the cluster, we prefer to have the circle only\n return new PinMarkerCluster(cluster.getClusterLocation(), cluster.markers[0].size, cluster, undefined);\n }\n}\n\ninterface DrapeGraphicState {\n graphic: GraphicPrimitive;\n collectorState: string;\n chordTolerance: number;\n range: Range3d;\n}\n\nclass DrapedPrimitives {\n private _strings?: LineString3d[];\n private _meshes?: Polyface[];\n private _points = new GrowableXYZArray();\n\n public get strings() {\n return this._strings;\n }\n\n public get meshes() {\n return this._meshes;\n }\n\n public get points() {\n return this._points;\n }\n\n public clear() {\n this._strings = undefined;\n this._meshes = undefined;\n this._points.clear();\n }\n\n public addStrings(drapedStrings: LineString3d[]) {\n if (!this._strings) {\n this._strings = [];\n }\n for (const ds of drapedStrings)\n this._strings.push(ds);\n }\n\n public addMeshes(drapedMeshes: Polyface[]) {\n if (!this._meshes)\n this._meshes = [];\n drapedMeshes.forEach((ds) => this._meshes!.push(ds));\n }\n}\n\n/** @internal */\nexport class MapFeatureInfoDecorator implements Decorator {\n public hidden = false;\n public readonly useCachedDecorations = true;\n public readonly disableTerrainDraper = false;\n public markerSize = new Point2d(32, 32);\n public lineWidth = 3;\n\n // This is the maximum allowed size of a geometry, in pixels, to be draped.\n // If the value is too large, we will end up downloading tons of terrain tiles, and possibly hang for too long.\n public maxDrapeSizePixels = 50000;\n\n // This value controls the chord tolerance used to collect terrain tiles\n // at the \"right\" resolution. Higher values, will give coarser terrain tiles.\n public chordTolerancePixels = 20;\n\n private _highlightColor = ColorDef.from(0, 255, 255, 127);\n public get highlightColor() { return this._highlightColor;}\n public set highlightColor(color: ColorDef) {\n this.updateMarkerImage();\n this._highlightColor = color;\n }\n\n public get defaultMarkerIconSvgXml() { return `<svg class=\"indicator\" viewBox=\"0 0 22 22\" width=\"22\" height=\"22\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m11 0a7.44506 7.44506 0 0 0 -7.5 7.2875c0 1.65 1.132 4.2625 3.25477 8.1125 1.55652 2.75 4.24523 6.6 4.24523 6.6s2.68865-3.9875 4.24528-6.7375c2.12272-3.85 3.25472-6.4625 3.25472-8.1125a7.4215 7.4215 0 0 0 -7.5-7.15z\" fill=\"black\"/><path d=\"m11 1.01715a6.46476 6.46476 0 0 0 -6.48285 6.27033c0 1.72619 1.67181 4.97973 3.12836 7.62139.97564 1.7237 2.42828 3.92176 3.34118 5.27161.91413-1.39148 2.385-3.673 3.37336-5.41907 1.451-2.63171 3.1228-5.88525 3.1228-7.61139a6.39982 6.39982 0 0 0 -6.48285-6.13287zm.00183 8.98285a3 3 0 1 1 3-3 3 3 0 0 1 -3 3z\" fill=\"${this.highlightColor.toRgbString()}\"/></svg>`; }\n\n private _scratchPoints = new GrowableXYZArray();\n\n private _drapeGraphicsStates: DrapeGraphicState[] = [];\n private _drapedPrimitives = new DrapedPrimitives();\n private _allGeomDraped = false;\n private _draper?: GeometryTerrainDraper;\n private _markerImage: HTMLImageElement;\n private _markerSet = new PinMarkerSet();\n\n // Extra markers can be added outside the normal state\n public extraMarkers: Point3d[]|undefined;\n\n private _data: MapFeatureInfoToolData | undefined;\n\n private readonly _graphicType = GraphicType.WorldOverlay;\n\n public constructor() {\n this._markerImage = new Image();\n this.updateMarkerImage();\n }\n\n private updateMarkerImage() {\n const base64 = Base64EncodedString.encode(this.defaultMarkerIconSvgXml);\n this._markerImage.src = `data:image/svg+xml;base64,${base64}`;\n }\n\n private computePixelSize(viewport: Viewport, applyAspectRatioSkew: boolean, pointWorld: Point3d) {\n let pixelSize = 1;\n // Compute the horizontal distance in meters between two adjacent pixels at the center of the geometry.\n pixelSize = viewport.getPixelSizeAtPoint(pointWorld);\n pixelSize = viewport.target.adjustPixelSizeForLOD(pixelSize);\n\n // Aspect ratio skew > 1.0 stretches the view in Y. In that case use the smaller vertical pixel distance for our stroke tolerance.\n const skew = applyAspectRatioSkew ? viewport.view.getAspectRatioSkew() : 0;\n if (skew > 1)\n pixelSize /= skew;\n return pixelSize * 0.25;\n }\n\n private computeChordTolerance(viewport: Viewport, drapeRange: Range3d) {\n const drapeSizeWorld = Math.max(drapeRange.xLength(), drapeRange.yLength());\n const pixelSize = this.computePixelSize(viewport, true, drapeRange.center);\n const maxDrapeRangeSizeRatio = this.maxDrapeSizePixels / (drapeSizeWorld / pixelSize);\n if (maxDrapeRangeSizeRatio < 1) {\n Logger.logWarning(loggerCategory, \"Element too large; chord tolerance was adjusted\");\n return (pixelSize / maxDrapeRangeSizeRatio)*this.chordTolerancePixels;\n }\n return pixelSize*this.chordTolerancePixels;\n };\n\n public clearData = () => {\n this._data = undefined;\n };\n\n public setData = (data: MapFeatureInfoToolData) => {\n\n this._drapedPrimitives.clear();\n this._allGeomDraped = false;\n this.hidden = false;\n\n this._data = data;\n IModelApp.viewManager.invalidateCachedDecorationsAllViews(this);\n\n this._drapeGraphicsStates = [];\n\n if (!this.disableTerrainDraper && this._data.mapInfo?.layerInfos && data.hit.viewport.displayStyle.displayTerrain) {\n\n if (data.hit?.modelId) {\n const drapeTreeRef = this.getGeometryTreeRef(data.hit.viewport);\n if (drapeTreeRef) {\n this._draper = new GeometryTerrainDraper(data.hit.viewport, drapeTreeRef);\n return;\n }\n }\n }\n\n if (this._draper) {\n // Dispose draper every time?\n this._draper[Symbol.dispose]();\n this._draper = undefined;\n }\n };\n\n private getGeometryTreeRef(vp: Viewport): GeometryTileTreeReference | undefined {\n if (vp.backgroundMapSettings.applyTerrain) {\n for (const ref of vp.mapTileTreeRefs) {\n if (ref instanceof MapTileTreeReference) {\n return ref.createGeometryTreeReference();\n }\n }\n }\n\n return undefined;\n }\n\n protected renderGraphics(context: DecorateContext) {\n this._markerSet.markers.clear();\n\n if (this._data?.mapInfo?.layerInfos === undefined || this.hidden) {\n return undefined;\n }\n\n let transform: Transform|undefined;\n const groundBias = context.viewport.displayStyle.backgroundMapSettings.groundBias;\n if (groundBias !== 0) {\n transform = Transform.createTranslationXYZ(0, 0 , groundBias);\n }\n const builder = context.createGraphicBuilder(this._graphicType, transform);\n\n if (this._draper) {\n this.initializeDrapeState(context.viewport);\n\n // We need to call drapeGeometries() until it returns true (i.e. fully complete)\n if (!this._allGeomDraped) {\n if (!this.drapeGeometries(context.viewport))\n return undefined;\n }\n\n this.appendDrapedGeometries(builder);\n } else {\n // Append geometries straight from the state to the builder\n this.appendGeometries(builder);\n }\n\n // Add extra markers if any specified\n if ( this.extraMarkers !== undefined) {\n this.extraMarkers.forEach((markerPoint)=> {\n builder.setSymbology(this.highlightColor, this.highlightColor, this.lineWidth);\n this._markerSet.markers.add(new PinMarker(markerPoint, this.markerSize, this._markerImage));\n });\n }\n\n return builder.finish();\n }\n\n // Iterates the mapfeatureinfo data and create a draping state for each entry\n private initializeDrapeState(viewport: ScreenViewport) {\n if (this._drapeGraphicsStates.length === 0) {\n const getGraphicRange = (graphic: GraphicPrimitive) => {\n if (graphic.type === \"linestring\")\n return Range3d.createArray(graphic.points);\n else if (graphic.type === \"loop\")\n return graphic.loop.range();\n else if (graphic.type === \"pointstring\")\n return Range3d.createArray(graphic.points);\n else\n return Range3d.createNull();\n };\n\n for (const layerInfo of this._data?.mapInfo?.layerInfos??[]) {\n for (const subLayerInfo of layerInfo?.subLayerInfos??[]) {\n for (const feature of subLayerInfo.features) {\n\n feature.geometries?.forEach(((geom)=> {\n const range = getGraphicRange(geom.graphic);\n this._drapeGraphicsStates.push({\n graphic: geom.graphic,\n collectorState: \"loading\",\n chordTolerance: this.computeChordTolerance(viewport, range),\n range,\n });\n } ));\n }\n }\n }\n }\n }\n\n // returns true when all geometries are fully draped; otherwise false\n private drapeGeometries(_viewport: ScreenViewport): boolean {\n if (!this._draper)\n return false;\n\n let hasMissingDrapeGeoms = false;\n for (const state of this._drapeGraphicsStates) {\n if (state.collectorState === \"loading\") {\n this._scratchPoints.clear();\n\n if (state.graphic.type === \"linestring\") {\n this._scratchPoints.pushAll(state.graphic.points);\n const drapedStrings: LineString3d[] = [];\n if (\"loading\" === this._draper.drapeLineString(drapedStrings, this._scratchPoints, state.chordTolerance, state.range)) {\n hasMissingDrapeGeoms = true;\n break;\n } else {\n this._drapedPrimitives.addStrings(drapedStrings);\n state.collectorState = \"complete\";\n }\n } else if (state.graphic.type === \"loop\") {\n const loop = state.graphic.loop;\n const outMeshes: Polyface[] = [];\n if (\"loading\" === this._draper.drapeLoop(outMeshes, loop, state.chordTolerance, state.range)) {\n hasMissingDrapeGeoms = true;\n break; // We drape each graphic sequentially, otherwise collector get messed up.\n } else {\n this._drapedPrimitives.addMeshes(outMeshes);\n state.collectorState = \"complete\";\n }\n } else if (state.graphic.type === \"pointstring\") {\n const outPoint = Point3d.createZero();\n for (const point of state.graphic.points) {\n if (\"loading\" === this._draper.drapePoint(outPoint, point, state.chordTolerance, state.range)) {\n this._allGeomDraped = false;\n return false;\n } else if (!outPoint.isZero) {\n this._drapedPrimitives.points.push(outPoint);\n }\n }\n }\n }\n }\n\n this._allGeomDraped = !hasMissingDrapeGeoms;\n return this._allGeomDraped;\n }\n\n private appendDrapedGeometries(builder: GraphicBuilder) {\n if (this._drapedPrimitives.strings) {\n builder.setSymbology(this.highlightColor, this.highlightColor, this.lineWidth);\n this._drapedPrimitives.strings.forEach((line) => builder.addLineString(line.points));\n }\n\n if (this._drapedPrimitives.meshes) {\n builder.setSymbology(this.highlightColor, this.highlightColor, this.lineWidth);\n this._drapedPrimitives.meshes.forEach((polyface) => builder.addPolyface(polyface, true));\n }\n\n if (this._drapedPrimitives.points.length > 0) {\n for (let i = 0; i < this._drapedPrimitives.points.length; i++) {\n this._markerSet.markers.add(new PinMarker(this._drapedPrimitives.points.getPoint3dAtUncheckedPointIndex(i), this.markerSize, this._markerImage));\n }\n }\n }\n\n private appendGeometries(builder: GraphicBuilder) {\n if (!this._data?.mapInfo?.layerInfos)\n return;\n\n builder.setSymbology(this.highlightColor, this.highlightColor, this.lineWidth);\n for (const layerInfo of this._data.mapInfo.layerInfos) {\n if (layerInfo.subLayerInfos && !(layerInfo.subLayerInfos instanceof HTMLElement)) {\n for (const subLayerInfo of layerInfo.subLayerInfos) {\n for (const feature of subLayerInfo.features) {\n if (feature.geometries) {\n for (const geom of feature.geometries) {\n if (geom.graphic.type === \"pointstring\") {\n for (const point of geom.graphic.points)\n this._markerSet.markers.add(new PinMarker(point, this.markerSize, this._markerImage));\n } else {\n builder.addPrimitive(geom.graphic);\n }\n\n }\n }\n }\n }\n\n }\n\n }\n }\n\n public decorate(context: DecorateContext): void {\n const graphics = this.renderGraphics(context);\n if (graphics) {\n context.addDecoration(this._graphicType, graphics);\n IModelApp.toolAdmin.setCursor(undefined);\n }\n\n this._markerSet.addDecoration(context);\n return;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/map-layers-formats",
|
|
3
|
-
"version": "5.0.0-dev.
|
|
3
|
+
"version": "5.0.0-dev.52",
|
|
4
4
|
"description": "Enables additional map-layers formats in iTwin.js",
|
|
5
5
|
"main": "lib/cjs/map-layers-formats.js",
|
|
6
6
|
"module": "lib/esm/map-layers-formats.js",
|
|
@@ -46,19 +46,19 @@
|
|
|
46
46
|
"typemoq": "^2.1.0",
|
|
47
47
|
"typescript": "~5.6.2",
|
|
48
48
|
"fetch-mock": "~11.1.3",
|
|
49
|
-
"@itwin/
|
|
50
|
-
"@itwin/
|
|
51
|
-
"@itwin/core-
|
|
52
|
-
"@itwin/core-
|
|
53
|
-
"@itwin/core-
|
|
54
|
-
"@itwin/core-
|
|
49
|
+
"@itwin/build-tools": "5.0.0-dev.52",
|
|
50
|
+
"@itwin/appui-abstract": "5.0.0-dev.52",
|
|
51
|
+
"@itwin/core-geometry": "5.0.0-dev.52",
|
|
52
|
+
"@itwin/core-bentley": "5.0.0-dev.52",
|
|
53
|
+
"@itwin/core-common": "5.0.0-dev.52",
|
|
54
|
+
"@itwin/core-frontend": "5.0.0-dev.52"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@itwin/
|
|
58
|
-
"@itwin/
|
|
59
|
-
"@itwin/core-
|
|
60
|
-
"@itwin/core-
|
|
61
|
-
"@itwin/core-
|
|
57
|
+
"@itwin/appui-abstract": "5.0.0-dev.52",
|
|
58
|
+
"@itwin/core-common": "5.0.0-dev.52",
|
|
59
|
+
"@itwin/core-geometry": "5.0.0-dev.52",
|
|
60
|
+
"@itwin/core-bentley": "5.0.0-dev.52",
|
|
61
|
+
"@itwin/core-frontend": "5.0.0-dev.52"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"google-protobuf": "~3.20.1",
|