mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-02 14:29:36 +00:00
135 lines
4.6 KiB
HTML
Executable File
135 lines
4.6 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>API</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 class="configurator">
|
|
<div class="header">Configurator</div>
|
|
<h4 class="box-col config-label">Center</h4>
|
|
<div class="box-col">
|
|
<ul class="options">
|
|
<li>
|
|
<input id="centerLat" data-role="numerictextbox"
|
|
data-format="N4" value="30.2681" data-decimals="4" />
|
|
<input id="centerLng" data-role="numerictextbox"
|
|
data-format="N4" value="-97.7448" data-decimals="4" />
|
|
<button id="center">center()</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<h4 class="box-col config-label">Zoom level</h4>
|
|
<div class="box-col">
|
|
<ul class="options">
|
|
<li>
|
|
<select id="zoomLevel" data-role="dropdownlist">
|
|
<option value="1">1 (min)</option>
|
|
<option value="2">2</option>
|
|
<option value="3" selected="selected">3</option>
|
|
<option value="4">4</option>
|
|
<option value="5">5</option>
|
|
<option value="6">6</option>
|
|
<option value="7">7</option>
|
|
<option value="8">8</option>
|
|
<option value="9">9</option>
|
|
<option value="10">10</option>
|
|
<option value="11">11</option>
|
|
<option value="12">12</option>
|
|
<option value="13">13</option>
|
|
<option value="14">14</option>
|
|
<option value="15">15</option>
|
|
<option value="16">16</option>
|
|
<option value="17">17</option>
|
|
<option value="18">18 (max)</option>
|
|
</select>
|
|
<button id="zoom">zoom()</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="map"></div>
|
|
|
|
<script>
|
|
function createMap() {
|
|
$("#map").kendoMap({
|
|
center: [30.2681, -97.7448],
|
|
zoom: 3,
|
|
layers: [{
|
|
type: "tile",
|
|
urlTemplate: "https://#= subdomain #.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png",
|
|
subdomains: ["a", "b", "c"],
|
|
attribution: "© <a href='https://osm.org/copyright'>OpenStreetMap</a> contributors"
|
|
}],
|
|
panEnd: updateControls,
|
|
zoomEnd: updateControls
|
|
});
|
|
}
|
|
|
|
$(document).ready(createMap);
|
|
|
|
kendo.init($(".configurator"));
|
|
|
|
$("#center").click(function (e) {
|
|
$("#map").data("kendoMap").center([
|
|
parseFloat($("#centerLat").val()),
|
|
parseFloat($("#centerLng").val())
|
|
]);
|
|
});
|
|
|
|
$("#zoom").click(function (e) {
|
|
$("#map").data("kendoMap").zoom(
|
|
parseInt($("#zoomLevel").val(), 10)
|
|
);
|
|
});
|
|
|
|
function updateControls() {
|
|
var map = $("#map").data("kendoMap");
|
|
var center = map.center();
|
|
|
|
if (kendo.ui.NumericTextBox) {
|
|
$("#centerLat").data("kendoNumericTextBox").value(center.lat);
|
|
$("#centerLng").data("kendoNumericTextBox").value(center.lng);
|
|
$("#zoomLevel").data("kendoDropDownList").value(map.zoom());
|
|
}
|
|
}
|
|
|
|
</script>
|
|
<style>
|
|
.configurator h4.box-col.config-label {
|
|
margin-top: 8px;
|
|
}
|
|
</style>
|
|
|
|
|
|
<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>
|