2015-10-28 50 views

回答

0

你需要创建一个功能定义了线串几何,然后将其添加到矢量源中。

实施例:

vectorSource.addFeature(
    new ol.Feature({ 
     geometry: new ol.geom.LineString([ 
      [-110000, 4600000], 
      [0, 0] 
     ]) 
    }) 
) 

custom interation example这从openlayers.org演示此。

+0

完美的我正在寻找! – TooFast