viewSize

Retrieves the size of the visible portion of the map.

Returns

Object The size (width and height) of the visible portion of the map.

Example - retrieve view size

<div id="map"></div>
<script>
    $("#map").kendoMap({
        zoom: 1, // Layer size is 512px (2^1 * 256)
        layers: [{
            type: "tile",
            urlTemplate: "http://a.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png",
            attribution: "&copy; OpenStreetMap"
        }]
    });

    var map = $("#map").data("kendoMap");
    var viewSize = map.viewSize();
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log(viewSize);
    // { width: 1024, height: 512 }
</script>
In this article