I’m reaching out with a feature request for the DistanceMeasurement2D and AreaMeasurement2D widgets in the ArcGIS API for JavaScript. I’ve been trying to customize the line, point, polygon symbology used by these measurement tools while drawing, but haven’t had any luck. I also checked the community board and couldn’t find a good solution.
It would be great if we could set custom symbols for these widgets, similar to how we can with the SketchViewModel . This would make it a lot easier to ensure a consistent and customized look for measurement tools in our applications.
What I’m Suggesting:
- Add properties like lineSymbol, polygonSymbol, and polylineSymbol to the DistanceMeasurement2D and AreaMeasurement2D widgets
const distanceMeasurement = new DistanceMeasurement2D({
view: view,
unitOptions: ["meters", "kilometers"],
lineSymbol: new SimpleLineSymbol({
color: [0, 0, 255, 0.8],
width: 4,
style: 'dash'
}),
});
Thanks a bunch for considering this! If there are any workarounds or suggestions in the meantime, I’d be open to hearing them!
Best,
Silvan