[OpenLayers-Users] Re: Find the modified point of a linestring.
mafonso
mafonso333 at gmail.com
Wed May 11 09:29:35 EDT 2011
ok... I'm using this to solve my problem... not sure if it is the best
way...
// Open the popup to allow user to enter precise X,Y vertex coordinates
controls.modifyControlCoords.dragStart = function(vertex) {
popupVertexGeom2(vertex);
}
function popupVertexGeom2(vertex) {
$('datum73_X').value= vertex.geometry.x;
$('datum73_Y').value= vertex.geometry.y;
// keep reference to vertex on global var... ugly but works...
currentVertex = vertex;
}
// After clicking submit, apply vertex coordinates and deactivate modify
control
function applyModifyCoords() {
var x = $('datum73_X').value;
var y = $('datum73_Y').value;
if (x != null && isNaN(parseFloat(x)) === false) currentVertex.geometry.x =
x;
if (y != null && isNaN(parseFloat(y)) === false) currentVertex.geometry.y =
y;
}
Any better ideas?
Thanks
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Find-the-modified-point-of-a-linestring-tp5733159p6351861.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list