这里地图两点距离计算的单位是什么?
What is the unit of two point distance calculation in here map?
我正在使用 heremap 方法计算两点之间的距离,如下所示:
var pointStart = {
lat: '40.822197',
lng: '-98.188853'
}
var pointEnd = {
lat: '43.083113',
lng: '-77.589063'
}
var p1 = new H.geo.Point(pointStart.lat, pointStart.lng);
var p2 = new H.geo.Point(pointEnd.lat, pointEnd.lng);
var dist = p1.distance(p2);
距离的单位是什么?
是米。您可以在文档中找到它 - https://developer.here.com/documentation/maps/topics_api/h-geo-point.html#h-geo-point__distance
距离(其他):{number}
Returns点与调用者提供的点之间的距离。该方法使用 Haversine 公式。不考虑海拔高度。
参数:
其他:
{H.geo.IPoint}
An object representing the point to which to calculate the distance
Returns:
{number}
A value indicating the distance between the given location and the location supplied by the caller in meters
我正在使用 heremap 方法计算两点之间的距离,如下所示:
var pointStart = {
lat: '40.822197',
lng: '-98.188853'
}
var pointEnd = {
lat: '43.083113',
lng: '-77.589063'
}
var p1 = new H.geo.Point(pointStart.lat, pointStart.lng);
var p2 = new H.geo.Point(pointEnd.lat, pointEnd.lng);
var dist = p1.distance(p2);
距离的单位是什么?
是米。您可以在文档中找到它 - https://developer.here.com/documentation/maps/topics_api/h-geo-point.html#h-geo-point__distance
距离(其他):{number}
Returns点与调用者提供的点之间的距离。该方法使用 Haversine 公式。不考虑海拔高度。
参数:
其他: {H.geo.IPoint}
An object representing the point to which to calculate the distance
Returns:
{number}
A value indicating the distance between the given location and the location supplied by the caller in meters