Calculates the average distance between points in an array of coordinates.
This function computes the average distance between consecutive points in the array.
It uses the LngLat class from MapLibre to calculate distances based on geographical coordinates.
Parameters
arr: [number,number][]
An array of coordinate pairs [longitude, latitude]
Calculates the average distance between points in an array of coordinates.
This function computes the average distance between consecutive points in the array. It uses the LngLat class from MapLibre to calculate distances based on geographical coordinates.