Edit this page

shapeMouseLeave

Fired when the mouse leaves a shape.

Important This event will fire reliably only for shapes that have set fill color. The opacity can still be set to 0 so the shapes appear to have no fill.

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 shapeMouseLeave event on initialization

<div id="map"></div>
<script>
    $("#map").kendoMap({
        zoom: 3,
        center: [0, 0],
        layers: [{
          type: "shape",
          dataSource: {
            type: "geojson",
            data: [{
              "type": "Polygon",
              "coordinates": [
                [[0, 10], [0, 20], [10, 20], [10, 10], [0, 10]]
              ]
            }, {
              "type": "Polygon",
              "coordinates": [
                [[0, 0], [0, 10], [10, 10], [10, 0], [0,0]]
              ]
            }]
          },
          style: {
            fill: {
              color: "#aaa"
            }
          }
        }],
        shapeMouseLeave: function() {
            console.log("shape mouseleave");
        }
    });
</script>

Example - bind to the map shapeMouseLeave event after initialization

<div id="map"></div>
<script>
    $("#map").kendoMap({
        zoom: 3,
        center: [0, 0],
        layers: [{
          type: "shape",
          dataSource: {
            type: "geojson",
            data: [{
              "type": "Polygon",
              "coordinates": [
                [[0, 10], [0, 20], [10, 20], [10, 10], [0, 10]]
              ]
            }, {
              "type": "Polygon",
              "coordinates": [
                [[0, 0], [0, 10], [10, 10], [10, 0], [0,0]]
              ]
            }]
          },
          style: {
            fill: {
              color: "#aaa"
            }
          }
        }]
    });

    var map = $("#map").data("kendoMap");
    map.bind("shapeMouseLeave", function(e) {
        console.log("shape mouseleave");
    });
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy