error in my code, i can't create a hull by turf because it isn't format input enter image description here
var pointData = [
[-74.5, 40],
[-74.6, 40.1],
[-74.4, 39.9],
[-74.55, 39.95],
[-74.65, 40.05],
[-74.35, 40.15]
];
var pointGeoJSON = {
type: 'FeatureCollection',
features: pointData.map(function(coord) {
return {
type: 'Feature',
geometry: {
type: 'Point',
coordinates: coord
}
};
})
};
var hull = turf.convex(pointGeoJSON);