Hi, @Sage_Wall ,
I wanted to change the vertex of the polyline but i didnot find any way to change the vertex of the polyline. Anybody have any idea how to do this.
here is my code in codepen
https://codepen.io/ayaxcphb-the-decoder/pen/ByaLRJq
Thank You!
Solved! Go to Solution.
I change the vertex using two graphic layers one for polyline and other for custom vertex, may be it is not the best way to do it, but for now it is the only way i can find to do this.
here is the code in codepen
https://codepen.io/ayaxcphb-the-decoder/pen/ByaLRJq
There is an optional options parameter you can pass into the update method to set the reshape tool as active.
sketchViewModel.update(polylineGraphic, {tool: "reshape"});
https://codepen.io/sagewall/pen/ogNzwZM
@Sage_Wall , Thank you for your response, I need to change the vertex symbols of the polyline, it is not changing the symbol of the vertex.
Sorry about that, I misunderstood the question. I'm not so sure there is a way to change the vertex symbols. I can check in with the editing team, but I don't see an obvious way to do this.
@Sage_Wall , Thank You for your support, please let me know here if you find any way to do this.
I think the best we can do currently is change the colors with the view.theme and view.highlights. And these properties require more recent versions than you had in your original sample code. View.highlights wasn't introduced until yesterday 🙂 at version 4.32. I don't think there is a way to change the symbol to a square for example but using the theme property you can change the accentColor. I found a sample to help and updated my codepen.
https://developers.arcgis.com/javascript/latest/sample-code/view-theme/
https://codepen.io/sagewall/pen/ogNzwZM
const view = new MapView({
center: [-80, 35],
container: "viewDiv",
highlights: [{
name: "default",
color: "red"
}],
map,
zoom: 3,
theme: {
accentColor: [255, 0, 0, 1],
textColor: "red"
}
});
@Sage_Wall , Thank you for continuous support.
I change the vertex using two graphic layers one for polyline and other for custom vertex, may be it is not the best way to do it, but for now it is the only way i can find to do this.
here is the code in codepen
https://codepen.io/ayaxcphb-the-decoder/pen/ByaLRJq