shapeClick

Fired when a shape is clicked or tapped.

Event Data

e.layer kendo.dataviz.map.layer.Shape

The parent layer instance.

e.shape kendo.drawing.Element

The the shape instance.

e.sender kendo.dataviz.ui.Map

The source widget instance.

e.originalEvent Object

The source jQuery event instance

Example - bind to the map shapeClick event on initialization

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

Example - bind to the map shapeClick event after initialization

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

    var map = $("#map").data("kendoMap");
    map.bind("shapeClick", function(e) {
        console.log("shape clicked");
    });
</script>
In this article
Not finding the help you need? Improve this article