          })
          });
          return [style];
        }
      });

      var edges = new ol.source.Vector({wrapX: false});
      var edgesLayer = new ol.layer.Vector({
        source: edges,
        style: function(f) {
          var style = new ol.style.Style({
            stroke: new ol.style.Stroke({
              color: 'blue',
              width: 1
            }),
            text: new ol.style.Text({
              text: f.get('edge').id.toString(),
              fill: new ol.style.Fill({color: