Edit this page

setDataSource

Sets the data source of this layer.

Example - Set shape layer data source

<div id="map"></div>
<script>
    $("#map").kendoMap({
        layers: [{
            type: "marker",
            dataSource: ds,
            locationField: "latlng"
        }]
    });

    var ds = new kendo.data.DataSource({
        data: [{
            latlng: [0, 0]
        }]
    });

    var map = $("#map").data("kendoMap");
    var layer = map.layers[0];
    layer.setDataSource(ds);
</script>

Parameters

dataSource ObjectA live DataSource instance

or its configuration object.

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy