distanceTo

Finds a destination at the given distance and bearing from this location.

Example

<script>
var newYork = new kendo.dataviz.map.Location(40.7128, -74.0060);
var chicago = new kendo.dataviz.map.Location(41.8781, -87.6298);

var distance = newYork.distanceTo(chicago);
console.log("Distance from NYC to Chicago:", Math.round(distance), "meters");
console.log("Distance in miles:", Math.round(distance * 0.000621371), "miles");
</script>

Parameters

distance Number

The distance to the destination in meters.

bearing Number

The initial bearing to the destination in decimal degrees.

Returns

kendo.dataviz.map.Location The destination at the given distance and bearing.

In this article
distanceTo
Not finding the help you need?
Contact Support