I have an application in OpenLayers which shows a number of devices (Feature) on a map. The devices are linked between each other by cables (MultiLineString).
searchBoxModule.functions.createConnection = function createConnection(from, to) {
var fromGeom = new OpenLayers.Geometry.Point(from.geometry.coordinates[0], from.geometry.coordinates[1]);
var toGeom = new OpenLayers.Geometry.Point(to.geometry.coordinates[0], to.geometry.coordinates[1]);
var multilineString = new OpenLayers.Geometry.MultiLineString([new OpenLayers.Geometry.LineString([fromGeom, toGeom])]);
var layer = MapView.getConnectionsLayers();
if (layer) {
layer.addFeatures([new OpenLayers.Feature.Vector(multilineString)]);
}}
The issue is that MultiLineString is basically an array of points which have no relationship to the features. So, currently when I drag a feature to a different location on the map the lines (cables) visually connecting them don't change and it looks like the cables have been disconnected.
Did anyone had this kind of issue? Any recommended solutions to that?

