New to Kendo UI for jQuery? Start a free 30-day trial

DistanceTo

methods

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

Parameters:distanceNumber

The distance to the destination in meters.

bearingNumber

The initial bearing to the destination in decimal degrees.

Returns:kendo.dataviz.map.Location

The destination at the given distance and bearing.

<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>
Not finding the help you need?
Contact Support