layers.dataSource Object|Array|kendo.data.DataSource

The data source of the layer. Can be a JavaScript object which represents a valid data source configuration, a JavaScript array or an existing kendo.data.DataSource instance.

Example - binding to inline GeoJSON data

<div id="map"></div>
<script>
    $("#map").kendoMap({
        layers: [{
            type: "shape",
            dataSource: {
                type: "geojson",
                data: [{
                    "type": "Polygon",
                    "coordinates": [
                        [[30, 10], [40, 40], [20, 40], [10, 20], [30, 10]]
                    ]
                }]
            }
        }]
    });
</script>

Example - binding a shape layer to existing data source

<div id="map"></div>
<script>
    var ds = new kendo.data.DataSource({
        type: "geojson",
        data: [{
            "type": "Polygon",
            "coordinates": [
                [[30, 10], [40, 40], [20, 40], [10, 20], [30, 10]]
            ]
        }]
    });

    $("#map").kendoMap({
        layers: [{
            type: "shape",
            dataSource: ds
        }]
    });
</script>

Example - binding a marker layer to existing data source

<div id="map"></div>
<script>
    var ds = new kendo.data.DataSource({
        data: [{
            latlng: [0, 0]
        }]
    });

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