<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello,<br>
<br>
You can define your own onComplete method for your drag
control. It will be call everytime a feature is done dragging :<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a
href="http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Control/DragFeature-js.html#OpenLayers.Control.DragFeature.onComplete">http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Control/DragFeature-js.html#OpenLayers.Control.DragFeature.onComplete</a><br>
<br>
In it, you can save your features to your DB. If you look at
the HTTP protocol, you'll see a commit method you can use for this
purpose. You can start there :<br>
<br>
<a class="moz-txt-link-freetext" href="http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Protocol/HTTP-js.html#OpenLayers.Protocol.HTTP.commit">http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Protocol/HTTP-js.html#OpenLayers.Protocol.HTTP.commit</a><br>
<br>
HTH,<br>
<br>
Alexandre<br>
<br>
<br>
On 12-11-25 06:41 AM, adidas wrote:<br>
</div>
<blockquote cite="mid:50B203EF.4010600@gmail.com" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hello! How to keep new coordinates in db when the user moved a
point?<br>
So I create points:<br>
<i> var layerNodes = new OpenLayers.Layer.Vector("Nodes", {</i><i><br>
</i><i> strategies : [new
OpenLayers.Strategy.BBOX({resFactor: 1.1})],</i><i><br>
</i><i> protocol : new OpenLayers.Protocol.HTTP({</i><i><br>
</i><i> url :
"get_layers.php?mode=GetNodesMarkers",</i><i><br>
</i><i> format : new OpenLayers.Format.Text()</i><i><br>
</i><i> })</i><i><br>
</i><i> });</i><i><br>
</i><i> map.addLayer(layerNodes);</i><br>
<br>
And how to make line change (it is necessary, that the user could
extend line) and to keep new coordinates in a DB?<br>
So i create the line:<br>
<i>lineLayer = new OpenLayers.Layer.Vector("Lines");</i><i><br>
</i><i> map.addLayer(lineLayer);</i><i><br>
</i><i> var line = new OpenLayers.Geometry.LineString(points);</i><i><br>
</i><i> line.transform(new OpenLayers.Projection("EPSG:4326"),
new OpenLayers.Projection("EPSG:900913"));</i><i><br>
</i><i> var lineFeature = new OpenLayers.Feature.Vector(line,
null, style_arr[CableLine_arr[k]['style']]);</i><i><br>
</i><i> lineLayer.addFeatures([lineFeature]);</i><br>
<br>
Movement of lines and points I plan to do, as here: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://openlayers.org/dev/examples/drag-feature.html">http://openlayers.org/dev/examples/drag-feature.html</a><br>
<br>
Thanks for answers!<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Alexandre Dubé
Mapgears
<a class="moz-txt-link-abbreviated" href="http://www.mapgears.com">www.mapgears.com</a>
</pre>
</body>
</html>