61 lines
1.4 KiB
HTML
61 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<link rel="stylesheet" href="/leaflet/leaflet.css">
|
|
<link rel="stylesheet" href="/public/map.css">
|
|
|
|
<script src="/leaflet/leaflet.js" type="text/javascript"></script>
|
|
<script src="/public/js/utils.js" type="text/javascript"></script>
|
|
|
|
<style>
|
|
html,
|
|
body {
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="">
|
|
<div id="map"></div>
|
|
<script>
|
|
window.loaded = false;
|
|
var params = {};
|
|
if (location.search) {
|
|
var parts = location.search.substring(1).split('&');
|
|
|
|
for (var i = 0; i < parts.length; i++) {
|
|
var nv = parts[i].split('=');
|
|
if (!nv[0]) continue;
|
|
params[nv[0]] = nv[1] || true;
|
|
}
|
|
}
|
|
|
|
initMapLib(params, main);
|
|
|
|
function main() {
|
|
var mapDiv = document.getElementById("map");
|
|
if (mapDiv) {
|
|
mapDiv.style.width = params.width + 'px';
|
|
mapDiv.style.height = params.height + 'px';
|
|
}
|
|
|
|
const map = L.map('map', {
|
|
zoomSnap: 0.1, maxZoom: 19,
|
|
zoomControl: false,
|
|
zoomAnimation: false,
|
|
attributionControl: false, attribution: ''
|
|
});
|
|
|
|
initMapBaseLayer(map, params);
|
|
|
|
map.setView([params.clat, params.clon], params.zoom);
|
|
}
|
|
</script>
|
|
</body>
|
|
|
|
</html> |