tooltip.templateString|Template
The template which renders the tooltip content.
The fields which can be used in the template are:
- location - the marker location (
kendo.dataviz.map.Location
instance) - marker - the marker instance
Setting a template disables the content option.
Example
<div id="map"></div>
<script>
$("#map").kendoMap({
layers: [{
type: "tile",
urlTemplate: "https://a.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png",
attribution: "© OpenStreetMap"
}],
markers: [{
location: [42.3601, 71.0589],
title: "Boston",
tooltip: {
template: (data) => `
<div>
<strong>Location:</strong> ${data.marker.title}<br>
<strong>Coordinates:</strong> ${data.location.lat}, ${data.location.lng}
</div>
`
}
}]
});
</script>
In this article