[OpenLayers-Dev] Problem with modify feture control

Xavier Mamano (jorix) xavier.mamano at gmail.com
Thu Feb 7 10:43:49 PST 2013

Hi Fred,

In function of 'featuremodified' listener use: 
  var point = vertices[i].clone(); 
instead of:
  var point = vertices[i];

OL returns a reference to the vertices, so the projection transformation is
changing the points of the feature, oops! ;-)



fredleput wrote
> Hi,
> I try to develop a drawing tool based on openLayers (i just began
> yesterday)
> I have a problem (a bug ?) with the modify feature control :
> - i draw a line
> - i select this line with the modify control
> - i move one point from this line
> - i deselect this line by clicking outside it
> => She disappear from the dom (the g vector tag disappear from the dom !)
> my code is attached for those who want to have a look.
> thanks,
> Fred (Paimpol, France, web developper)
> test-drawing-tool.zip
> <http://osgeo-org.1560.n6.nabble.com/file/n5032844/test-drawing-tool.zip>  

View this message in context: http://osgeo-org.1560.n6.nabble.com/Problem-with-modify-feture-control-tp5032844p5032879.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.

More information about the Dev mailing list