Select to view content in your preferred language

highlightOptions class property works on Sketch 2D, but not on SketchViewModel 2D (4.26)

425
1
08-15-2023 10:26 AM
GilbertNg2
New Contributor

We are currently using ArcGIS JS API version 4.26 in a custom mapping application, and noticed that the default "highlighter blue" polygon for shape editing cannot be disabled in the SketchViewModel class. However, it works fine on Sketch. 

In our custom JS code, we are setting up highlightOptions to disabled to match the official SDK documentation. 

When declaring a new SketchViewModel 2D, we are doing it like this: 

 

Editor_SketchViewModel = new SketchViewModel({
        view: mapview,
        layer: SketchGraphicsLayer, 
        defaultUpdateOptions: {
            highlightOptions: {
                enabled: false
            }
        }
    });

 

When setting up the .update() event, we are doing it like this: 

 

Editor_SketchViewModel.update(SketchGraphicsLayer.graphics.items, { tool: "transform", highlightOptions: { enabled: false } });

 

 

Tags (2)
1 Reply
GilbertNg2
New Contributor

If anyone has a solution or workaround, please let us know.