how to change the default capture geometry color?
I am using workflow to add/delete polygon in a feature service. DisplayCaptureGeometry activity puts red outline while a user is drawing a polygon. Once the drawing is finished the color is updated based on the feature service, however during the drawing the color is showing in red, which is difficult to see on the some of layer my map. How can I change the default color of the geometry when a user is drawing?
0
-
There might be a simpler way to do this, but since I had a custom module already going for my site, I was able to subscribe to the GraphicDrawActivatedEvent and then change the line and fill color. Here is the code that worked for me:
this.app.eventRegistry.event("GraphicDrawActivatedEvent").subscribe(this, (sender) => {
console.log('graphic drawing event!', sender);
let lineSymbol = sender.sender.lineSymbol;
lineSymbol.color.r = 0;
lineSymbol.color.b = 255;
lineSymbol.color.g = 255;
let fillSymbolOutline = sender.sender.fillSymbol.outline;
fillSymbolOutline.color.r = 0;
fillSymbolOutline.color.b = 255;
fillSymbolOutline.color.g = 255;
});0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
1 kommentar