Change/draw polyline on mouse move

153 views
Skip to first unread message

ch....@gmail.com

unread,
Sep 20, 2015, 9:06:54 AM9/20/15
to cesium-dev
Hellow,
I would like to draw a polygon on client mouse move.
I listen to tow event.
Mouse click(down), mouse move and maybe 'mouse up' as well.
So I want it to be like this:
First mouse click I get the first point, then when I move the mouse (awhile its still clicked) I would like to see a line with tow point, the first that clicked and the second point wich is where the mouse right now..
So when I move the mouse its like I'm drawing a line.
And when I have release the buttton (mouse up) I actually have a real line with tow points.
From there again, on mouse click/move I would have the third points of the polyline and it would move until the third click/mouse up of the mouse..

So I was able to do it with no problem with 'polyline' but with polygon I have a problem.
I was able to get something right but before I get into detail can you tell me if its even possible to do it with polyline?

gowtham.m...@gmail.com

unread,
Sep 21, 2015, 1:10:49 AM9/21/15
to cesium-dev, ch....@gmail.com
Hi,

Did you check DrawHelper plugin? You can find it in Plugins section. https://github.com/leforthomas/cesium-drawhelper

Thanks,
Gowtham.

Reply all
Reply to author
Forward
0 new messages