Select to view content in your preferred language

boundaryOperator not completing the Polygon Boundary

88
1
3 weeks ago
rhughes522
Occasional Contributor

Using the JS Maps SDK 4.31 with the boundaryOperator Geometry Operator within an Experience Builder custom widget.  When I pass in a polygon geometry the paths on the output Polyline don't close.  The last point in the path isn't the same as the first point like the rings in the Polygon.  

rhughes522_0-1736983804475.png

These are the rings in the polygon were the first vertex is identical to the last vertex.

rhughes522_2-1736984015619.png

These are the paths on the boundaryOperator output Polyline were the lastPoint is not identical to the first Point.

rhughes522_1-1736983954982.png

My two workarounds are to either A) generate a Polyline with paths from the Polygon rings, or B) Push the firstPoint from the Polyline paths onto the end of the Polyline paths array.  The boundaryOperator seems to be behaving like this every time regardless of the zoom level or shape of the polygon.

 

 

const feat_record: FeatureDataRecord = record as FeatureDataRecord;
const geo = feat_record.feature.geometry as Polygon;
let boundary_line = boundaryOperator.execute(geo) as Polyline;

 

 

0 Kudos
1 Reply
AndyGup
Esri Regular Contributor

Hi @rhughes522  please provide a minimal reproducible application. You can capture the feature record's geometry and manually create a polygon from it in the repro app. Here are some guidelines: https://developers.arcgis.com/javascript/latest/troubleshooting/#minimal-reproducible-application.

0 Kudos