containsAny
Tests if any of the locations is contained within the extent.
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 testLocations = [
new kendo.dataviz.map.Location(25.7617, -80.1918), // Miami (outside)
new kendo.dataviz.map.Location(32.7767, -96.7970), // Dallas (outside)
new kendo.dataviz.map.Location(41.4993, -81.6944) // Cleveland (inside)
];
console.log("Any location in extent:", extent.containsAny(testLocations)); // true
$("#map").kendoMap({
center: extent.center(),
zoom: 6
});
</script>
Parameters
locations Array
An array of locations to test for.
Returns
Boolean true if the extent contains any of the locations, false otherwise.
In this article