根据经纬度获取距离可以参考:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/map-map-V5\#section1962210347237demo片段参考:let from: mapCommon.LatLng = { latitude: 38, longitude: 118 }; let to: mapCommon.LatLng = { latitude: 39, longitude: 119 }; let distance = map.calculateDistance(from, to);
根据经纬度获取距离可以参考:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/map-map-V5\#section1962210347237
demo片段参考: