Editable polygon with dragging of polyline & point graphics

Hi, I’m trying to implement a Cesium feature in which will have following functionality:

  • When edit/redraw of polygon is started, the polypoints, polyline & the polygon should be displayed for editing.
  • On left mouse down on polypoint, polyline or polygon will enable user to drag the entity and move to new cordinates,
  • After leaving mouse button, the new point position should be updated.
  • If a polyline was clicked then a new point should be created and be placed on the new position.
  • In caee the polygon was dragged, then whole polygon should move with mouse pointer.

Following is one of the example related to polypoint which resembles with my requirement but the feature for polyline and polygon is also important.
Sandcastle example with polypoints

I would like to ask for any such good references which could show a good implementation of the required features.

Thank you.

@Aman_Goel
You can search DrawHelper on github for point, polyline and polygon.

1 Like

There are surprisingly many search results for ‘DrawHelper’. Some of them seem to target a certain version (and it’s not clear why). Some of them don’t seem to be maintained. Some of them are only documented in what appears to be Chinese.

Can you recommend one of these libraries?

1 Like

Thanks for suggestion. However, cesium drawhelper is not much maintained and moreover I have my implementation in react & typescript, so it becomes less relevant to my use case. But I’ve read the library code and that has given me some ideas but not so much that fit to this specific requirements.

Thank you.

Well to be honest, I have read many of the forks as well as original drawhelper project. However, following one seems to be really easy for me to understand drawHelper

Hope it helps. Thank you