mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-02 14:29:36 +00:00
143 lines
4.1 KiB
HTML
Executable File
143 lines
4.1 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Events</title>
|
|
<meta charset="utf-8">
|
|
<link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.common.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.rtl.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.mobile.min.css" rel="stylesheet">
|
|
<script src="../../js/jquery.min.js"></script>
|
|
<script src="../../js/jszip.min.js"></script>
|
|
<script src="../../js/kendo.all.min.js"></script>
|
|
<script src="../content/shared/js/console.js"></script>
|
|
<script>
|
|
|
|
</script>
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<a class="offline-button" href="../index.html">Back</a>
|
|
|
|
<div id="example">
|
|
|
|
<div id="map" style="height: 300px;"></div>
|
|
|
|
<script>
|
|
function createMap() {
|
|
$("#map").kendoMap({
|
|
center: [39.6924, -97.3370],
|
|
zoom: 4,
|
|
layers: [{
|
|
type: "shape",
|
|
dataSource: {
|
|
type: "geojson",
|
|
transport: {
|
|
read: "../content/dataviz/map/us.geo.json"
|
|
}
|
|
},
|
|
style: {
|
|
stroke: {
|
|
color: "#ccebc5"
|
|
},
|
|
fill: {
|
|
color: "#b3cde3"
|
|
}
|
|
}
|
|
}],
|
|
click: onClick,
|
|
reset: onReset,
|
|
pan: onPan,
|
|
panEnd: onPanEnd,
|
|
shapeClick: onShapeClick,
|
|
shapeCreated: onShapeCreated,
|
|
shapeFeatureCreated: onShapeFeatureCreated,
|
|
shapeMouseEnter: onShapeMouseEnter,
|
|
shapeMouseLeave: onShapeMouseLeave,
|
|
zoomStart: onZoomStart,
|
|
zoomEnd: onZoomEnd
|
|
});
|
|
}
|
|
|
|
function onClick(e) {
|
|
kendoConsole.log(kendo.format(
|
|
"Click at :: {0}", e.location.toString()
|
|
));
|
|
}
|
|
|
|
function onReset(e) {
|
|
kendoConsole.log("Reset");
|
|
}
|
|
|
|
function onPan(e) {
|
|
kendoConsole.log(kendo.format(
|
|
"Pan to :: {0}", e.center.toString()
|
|
));
|
|
}
|
|
|
|
function onPanEnd(e) {
|
|
kendoConsole.log(kendo.format(
|
|
"Pan ended at :: {0}", e.center.toString()
|
|
));
|
|
}
|
|
|
|
function onShapeClick(e) {
|
|
kendoConsole.log(kendo.format(
|
|
"Shape click :: {0}", e.shape.dataItem.properties.name
|
|
));
|
|
}
|
|
|
|
function onShapeCreated(e) {
|
|
kendoConsole.log(kendo.format(
|
|
"Shape created :: {0}", e.shape.dataItem.properties.name
|
|
));
|
|
}
|
|
|
|
function onShapeFeatureCreated(e) {
|
|
kendoConsole.log(kendo.format(
|
|
"Feature created :: {0} with {1} child shape(s)",
|
|
e.properties.name,
|
|
e.group.children.length
|
|
));
|
|
}
|
|
|
|
function onShapeMouseEnter(e) {
|
|
kendoConsole.log(kendo.format(
|
|
"Shape mouseEnter :: {0}", e.shape.dataItem.properties.name
|
|
));
|
|
}
|
|
|
|
function onShapeMouseLeave(e) {
|
|
kendoConsole.log(kendo.format(
|
|
"Shape mouseLeave :: {0}", e.shape.dataItem.properties.name
|
|
));
|
|
}
|
|
|
|
function onZoomStart(e) {
|
|
kendoConsole.log("Zoom start");
|
|
}
|
|
|
|
function onZoomEnd(e) {
|
|
kendoConsole.log("Zoom end");
|
|
}
|
|
|
|
$(document).ready(createMap);
|
|
</script>
|
|
</div>
|
|
|
|
|
|
|
|
<div class='demo-section'>
|
|
<h3>Note:</h3>
|
|
<p>
|
|
Security restrictions prevent this example from working in all browsers when the page is loaded from the file system (via file:// protocol).
|
|
If the demo is not working as expected, please host the Kendo folder on a web server.
|
|
</p>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|