shapeFeatureCreated
Fired when a GeoJSON Feature is created on a shape layer.
Event Data
e.dataItem Object
The original data item for this Feature. Members include geometries and properties.
e.layer kendo.dataviz.map.layer
The parent layer instance.
e.group kendo.drawing.Group
The group containing feature shape instances.
e.properties Object
A reference to the dataItem.properties object.
e.sender kendo.dataviz.ui.Map
The source widget instance.
Example - bind to the map shapeFeatureCreated event on initialization
<div id="map"></div>
<script>
var data = [
{ "type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],
[100.0, 1.0], [100.0, 0.0] ]
]
},
"properties": {
"name": "Feature #1"
}
}
];
$("#map").kendoMap({
center: [0.5, 100.5],
zoom: 8,
layers: [{
type: "shape",
dataSource: {
type: "geojson",
data: data
}
}],
shapeFeatureCreated: onShapeFeatureCreated
});
function onShapeFeatureCreated(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log("feature created: ", e.properties.name);
}
</script>
In this article