GeoUtil
Provides a simple Geo method
Methods​
- distance(coord1,coord2)
- coord1
Coordinates - coord2
Coordinates - return
Number
- coord1
const dis=GeoUtil.distance([120,31],[122,32]);
- lineLength(coords)
- coords
maptalks.LineString|Array<Coordinates> - return
Number
- coords
const dis=GeoUtil.lineLength([[120,31],[122,32],..........]);
- lineSlice(coords,lineChunkLength)
- coords
maptalks.LineString|Array<Coordinates> - lineChunkLength
per line length - return
Array<Array<Coordinates>>
- coords
const lines=GeoUtil.lineLength([[120,31],[122,32]],100);