Edit this page

eventToLayer

Retrieves projected (layer) coordinates that correspond to this mouse event. Layer coordinates are absolute and change only when the zoom level is changed.

Parameters

e Object |jQuery.Event

The DOM or jQuery mouse event.

Returns

kendo.geometry.Point The projected (layer) coordinates that correspond to this mouse event.

Example - retrieve projected coordinates

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

    var map = $("#map").data("kendoMap");
    $("#map").click(function(e) {
        var proj = map.eventToLayer(e);
        console.log("Projected coordinates: ", proj.toString());
    });
</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