toArray

Returns the point coordinates as an [x, y] array.

Parameters

digits Number

(Optional) Number of fractional digits.

Returns

Array An array representation of the point, e.g. [10, 20]

Example

<script>
var geom = kendo.geometry;
var point = new geom.Point(10.12345, 20.67890);

var arrayDefault = point.toArray();
console.log(arrayDefault); // outputs: [10.12345, 20.6789]

var arrayRounded = point.toArray(2);
console.log(arrayRounded); // outputs: [10.12, 20.68]
</script>
In this article
toArray
Not finding the help you need?
Contact Support