I have one string with points:
var points =
[-417494.99760966154,4921341.910474674,-416272.0051570987,4922111.058071794]
And I am trying to print a Box
var Square = new ol.geom.Polygon([points]);
var SquareFeature = new ol.Feature(Square);
source = new ol.source.Vector();
source.addFeature(SquareFeature);
But it not working.
How should I parse the points?
Best Answer
Your points declaration is faulty.
Try this