Hello,
I wrote some javascript functions based on OpenLayers 2.7 to implement polygon operations, including draw a new polygon, edit a polygon and remove a polygon from a map. For each operation, it will catch the event and get the new vertics of the polygon. Also it uses stylemap to select different colors when the mouse move in and move out a polygon.
It works fine when I run it standalone. But, it does not work properly after I ported the code to my project which is based on ThinkGeo Web Edition. Such as, some codes does not work ; polygon vertics can not be accessed; the vertics points still stay on the map after remove a polygon; the SelectFeature with stylemap can causes the modification event when the mouse move in a polygon.
I put my code in the attachment and indicate the problem lines with comments.
Thanks
Yongfeng
1493-ThinkGeo_question1.html (5.82 KB)