ThinkGeo.com    |     Documentation    |     Premium Support

Vertex adding and vertex added event

hello ,
we have implemented and code in which we add the way point on the vertex added event but we are facing a problem when we click for the first time ,the vertex is added event get invoked twice. and same thing occurs on vertex adding event .why so? and the vertex added or adding event does not get invoked when we double click on the map.
please let us know at the earliest.
Thanks and Regards,
Hrishikesh Konde.

Hi Hrishikesh,

The first time it added two vertex, the one is start point, and the other is follow your mouse.

At the fist they will be with the same coordinates, if you want to handle it, please just ignore any one of them, you can set a flag to solve it, or you can use e.AddedVertex to see whether they are in the same location, if it’s the same location just ignore it.

And double check will fire the other event OnMapMouseDoubleClick.

Regards,

Ethan