I am storing the bbox of layers as strings, as the following string :
var layerExtent='[768039.2602094524, 5772524.37609651, 2313901.7202488566, 7435794.111581946]'
and I'm using this method to create a polygon from this bbox(extent) :
var bboxPolygon = turf.bboxPolygon(layerExtent);
but the polygon created has a weird coordinates so I can't use it to check intersection with other polygon with turf using:
var intersection = turf.intersect(bboxPolygon , item);
The structure of this polygon is as following:
so no intersection is detected, can you please give me ideas how make this work ? can I create a proper polygon from extents so I could use it to check for intersection with other polygons ?