[OpenLayers-Users] Re: Problem with ModifyFeature

2011-01-31 Thread MightTower
Ok the problem was that i use vertices[index].x=longitude; vertices[index].y=latitude; with var point= vertices[index]; point.move(newlongitude-point.x,newlatitude-point.y); everything works as expected. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Problem-with-M

[OpenLayers-Users] Problem with ModifyFeature

2011-01-31 Thread MightTower
Hello together, i have a little problem with OpenLayers.Control.ModifyFeature in RESHAPE mode. First i draw a path with just a start and a end point with OpenLayers.Control.DrawFeature(lineLayer, OpenLayers.Handler.Path,{eventListeners:{"featureadded":addedLine},handlerOptions: {maxVertices: 2}})

[OpenLayers-Users] Get the center of a regular Polygon

2011-01-05 Thread MightTower
Hello, i try to get the center of a just drawn regular Polygon with the follwing code: added =function (feature) { var center=feature.geometry.getCentroid(); alert(center.x); }; controls = { regular: new