假设我有一个 LineString(一条汽车路线):
let lineCoords = [
[ 10.964832305908203, 41.004681939880314 ],
[ 10.977363586425781, 40.99096148527727 ],
[ 10.983200073242188, 40.97075154073346 ],
[ 11.02834701538086, 40.98372150040732 ],
[ 11.02508544921875, 41.00716631272605 ],
];
和另一个 LineString (我必须做的停止)
let arrayOfPoints = [
[ 10.964832305908203, 41.004681939880314 ],
[ 10.994186401367188, 41.01947819666632 ],
[ 10.977363586425781, 40.99096148527727 ],
[ 10.983200073242188, 40.97075154073346 ],
[ 11.02508544921875, 41.00716631272605 ],
[ 10.964832305908203, 41.004681939880314 ],
[ 11.02834701538086, 40.98372150040732 ],
];
现在我想根据 lineCoords 对 arrayOfPoints 进行排序
我怎样才能做到?
草坪可以帮忙吗?