toArray

Returns the four extreme locations of the extent as an array.

Example

<div id="map"></div>
<script>
var extent = new kendo.dataviz.map.Extent(
    new kendo.dataviz.map.Location(42.3601, -71.0589), // Boston
    new kendo.dataviz.map.Location(40.7128, -74.0060)  // New York
);

var extentArray = extent.toArray();
console.log("Extent as array:", extentArray);
console.log("North West:", extentArray[0]);
console.log("North East:", extentArray[1]);
console.log("South East:", extentArray[2]);
console.log("South West:", extentArray[3]);

$("#map").kendoMap({
    center: extent.center(),
    zoom: 8
});
</script>

Returns

Array An array with [NW, NE, SE, SW] locations.

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