      function onDrawend(e) {
        var edgeGeom = e.feature.getGeometry().getCoordinates();
        var startCoord = edgeGeom[0];
        var endCoord = edgeGeom[edgeGeom.length - 1];
        var start, end;
        try {
          start = topo.getNodeByPoint(startCoord);
          end = topo.getNodeByPoint(endCoord);
          var edgesAtStart = topo.getEdgeByPoint(startCoord, 5);
          var edgesAtEnd = topo.getEdgeByPoint(endCoord, 5);
          var crossing = topo.getEdgesByLine(edgeGeom);
       