includeAll

Grows the extent, if required, to contain all specified locations.

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
);

console.log("Original extent center:", extent.center());

// Include multiple locations outside the current extent
var newLocations = [
    new kendo.dataviz.map.Location(38.9072, -77.0369), // Washington DC
    new kendo.dataviz.map.Location(25.7617, -80.1918), // Miami
    new kendo.dataviz.map.Location(41.8781, -87.6298)  // Chicago
];

extent.includeAll(newLocations);

console.log("Extended extent center:", extent.center());

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

Parameters

locations Array

The locations to include in the extent.

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