开发者

How to change position of a point/vertex in GWT maps polyline?

开发者 https://www.devze.com 2023-03-24 14:08 出处:网络
I am using GWT google-maps. I know how to draw a polyline and then edit it by calling setEditingEndabled(true).

I am using GWT google-maps. I know how to draw a polyline and then edit it by calling setEditingEndabled(true). I can change a single point by using mo开发者_如何学Cuse, manually. However, if I want to change a point/vertex programmatically, What should I do? polyline.insertVertex() will introduce new vertex. What I need is moving the current vertex around.

Thanks.


Try something like:

polyline.deleteVertex(index);
polyline.insertVertex(index, newVertex);
0

精彩评论

暂无评论...
验证码 换一张
取 消