I need to get a GeoJSON geometry of this, then use a buffer for the TURF library.
Get get data from GeoJSON turf but would not admit it in any way. any ideas ?
This is my code:
var feature_buff = select2.getFeatures();
var geojson = new ol.format.GeoJSON();
for (var i=0;i<feature_buff.getLength();i++){
json.push(geojson.writeFeature(feature_buff.item(i)));
var obj =geojson.writeFeatures(feature_buff.item(i))
var geom = geojson.readGeometry(obj);
var buffer = turf.buffer(geom, 2000, 'kilometers')
this code fail. and this is the error:
Uncaught TypeError: (0 , ls[b.type]) is not a function