I have declared a line geometry as:
var lineString = new OpenLayers.Geometry.LineString([source,target]);
then I am trying to get the centroid of this lineString as
But what's returning is a Start Point of the lineString.
So, is there any way to get the real centroid of a LineString?
P.S: I have also looked through this discussion. But couldn't figure out the solution.