==>I couldn't find the path of rings in the object returned in console like i have been getting in object reshape event below.
=======>
//listen to reshape-stop event get updated geometry pylgon vertics and pass through ajax
/*const eventInfo = event.toolEventInfo;
if (eventInfo && eventInfo.type.includes("reshape")) {
if(eventInfo.type=='reshape-stop'){
var updatedGeometry= webMercatorUtils.webMercatorToGeographic(event.graphics[0].geometry);
rings = updatedGeometry.__accessor__.store._values.rings;
}
}*/
When i go to accessor->store->values-> . It have more geometry attributes and have no ring coordinates. Whereever i find the ring parameter in console, it contains different value.
==>Whenever a new polygon appeared on click or when i click on screen it after clear all do not return any object and before click on clearall return objects which do not have any rings value
Kindly help me to get latest rings(either reshape or updated) of all polygons that appear on screen.
Also how to make them editable.
I have been trying to console rings here:
======>
function onGraphicUpdate(event) {
// get the graphic as it is being updated
const graphic = event.graphics[0]; //Do i need to perform loop over
// check if the update event's the toolEventInfo.type is move then stop move event
if (event.toolEventInfo && event.toolEventInfo.type.includes("move")){
sketchViewModel.cancel();
}
// If toolEventInfo.type is reshape-stop then it means user finished moving or reshaping the graphic, call complete method. This will change update event state to complete and we will check the validity of the graphic location.
if (
event.toolEventInfo &&
(event.toolEventInfo.type === "move-stop" ||
event.toolEventInfo.type === "reshape-stop")
) {
sketchViewModel.complete();
} else if (event.state === "cancel" || event.state === "complete") {
//check if the graphics are done being reshaped, printout updated graphic's geometry and reshape stage.
// graphic reshaping has been completed or cancelled
sketchViewModel.update([graphic], { tool: "reshape" });
}else {
graphic.symbol = validSymbol;
}
graphicsLayer.graphics.map(function(gra){
//do something with the gra (graphic)
console.log("====>");
console.log(gra);
});
}