Select to view content in your preferred language

Draw a polygon using the saved Geometry data ( Not using SketchEditor)

489
2
Jump to solution
01-23-2024 04:37 PM
DeepamPalaniswami
Occasional Contributor

Hi Team,

 I have successfully integrated the sketchEditor and able to draw polygon, undo, redo etc.

I have saved the geometry info in a Table and I wanted to redraw the saved geometry.

I have below code snippet trying to draw the saved geometry polygon.

fun drawn(geometry: Geometry) {
// create a graphic from the sketch editor geometry
val graphic = Graphic(geometry)

// add the graphic to the graphics overlay
graphicsOverlay.graphics.add(graphic)
}
}
}

 But I am not seeing the saved polygon. Need your help and insight in this regard. 

0 Kudos
1 Solution

Accepted Solutions
DeepamPalaniswami
Occasional Contributor

Hi, 

I was missing the drawlines thats why I can't see the lines. Once drawn problem solved.

All good . thanks.

View solution in original post

0 Kudos
2 Replies
RamaChintapalli
Esri Contributor

Hi,
Can you check if your graphicsOverlay is included in the Mapview's graphicOverlays collection?

Thanks
Rama

0 Kudos
DeepamPalaniswami
Occasional Contributor

Hi, 

I was missing the drawlines thats why I can't see the lines. Once drawn problem solved.

All good . thanks.

0 Kudos