Change vertex symbol size in SketchViewModel

156
3
2 weeks ago
EduardoBorges
New Contributor

Hello everyone. I want to change the size of the vertex circle symbol when sketch is in update mode. It have to be bigger because is tiny to user see.

EduardoBorges_0-1713220723469.png

The SketchViewModel object is like this.

const notamSketch = new SketchViewModel({

      layer: this.layers.get('layer'),
      view,
      polygonSymbol: {
        type: 'simple-fill',
        color: [0, 0, 0, 0],
        style: 'solid',
        outline: {
          color: 'black',
          width: 1,
        },
      },
      defaultUpdateOptions: {
        tool: 'reshape',
      },
    });
 
Is it possible to do that? Thanks everyone who could help.
0 Kudos
3 Replies
JoelBennett
MVP Regular Contributor

Please see this post which discusses changing the appearance of the vertex symbol.  It was from a year ago, but if things haven't changed, you'd probably want something like:

sketchViewModel.set("vertexSymbol.size", "20px");

 

0 Kudos
EduardoBorges
New Contributor

This solution dont't work for me...

0 Kudos
EduardoBorges
New Contributor

This approach worked for me, but when a move the cursor above the vertex symbol, return to the previous behaviour.

(
      this.sketch.get('_internalGraphicsLayer') as InternalGraphicsLayer
    )?.graphics.map((gra: Graphic) => {
      if (gra.geometry.type === 'point') {
        (gra.symbol as SimpleMarkerSymbol).size = 13;
      }
    });

B

0 Kudos