Hi,
While implementing the Turf with the Arcgis, below error is coming:
Argument of type '{ type: string; properties: { stroke: string; }; features: { type: string; properties: { color: string; }; geometry: { type: string; coordinates: number[][]; }; }[]; }' is not assignable to parameter of type 'Position[]'.
PFB the code snippet:
const getPoint = () => {
var line = turf.lineString({
type: 'FeatureCollection',
features: [
{
type: 'Feature',
properties: {
color: 'orange'
},
geometry: {
type: 'Polygon',
coordinates: [
[-77.031669, 38.878605],
[-77.029609, 38.881946],
[-77.020339, 38.884084],
[-77.025661, 38.885821],
[-77.021884, 38.889563],
[-77.019824, 38.892368],
]
}
}
]
});
const pt = turf.point([this.lat, this.lon]);
console.log('Inside turf', this.lat);
const snapped = turf.nearestPointOnLine(line, pt, {units: 'miles'});
};