2011-12-19 44 views

回答

0

您可以使用point回撥函數。它在地圖上繪製每個點後調用。

var drawOptions = { 
    callbacks : { 
     "point": pointHandler 
    }, 
}; 
var drawControls = { 
    line: new OpenLayers.Control.DrawFeature(lineLayer, OpenLayers.Handler.Path, drawOptions) 
}; 

var pointHandler = function(point) { 
    console.log(point.toString()); 
} 
相關問題