center

Gets or sets the map center. The setter is chainable, i.e. returns the map instance.

Parameters

center Array|kendo.dataviz.map.Location

The location of the new map center. An array argument is assumed to be in [Latitude, Longitude] order.

Returns

kendo.dataviz.map.Location The current map center.

Example - set the map center and zoom level

<div id="map"></div>
<script>
    $("#map").kendoMap({
        layers: [{
            type: "tile",
            urlTemplate: "http://a.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png",
            attribution: "&copy; OpenStreetMap"
        }]
    });

    var map = $("#map").data("kendoMap");
    map.center([32.7758, -96.7966]).zoom(10);
</script>
In this article
Not finding the help you need? Improve this article