-
Notifications
You must be signed in to change notification settings - Fork 3
/
map.html
41 lines (34 loc) · 1.26 KB
/
map.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html lang="en-us">
<head>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
crossorigin=""/>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
crossorigin=""></script>
</head>
<body>
<div id="mapid" style="z-index: 50; width: 130vh; height: 95vh;"></div>
<script>
//document.getElementById("mapid").style.height = frameHeight() + "px";
var bounds = [[0,0], [ document.getElementById("mapid").offsetHeight, document.getElementById("mapid").offsetWidth]];
var mymap = L.map('mapid', {
crs: L.CRS.Simple,
//minZoom: -2,
maxBounds: bounds,
maxBoundsViscosity: 1.0
}); //.setView([51.505, -0.09], 13);
var myIcon = L.icon({
iconUrl: './img/marker.png',
// DEBUG: Test Icon
//iconUrl: './img/dot.png',
iconSize: [50, 50],
});
var image = L.imageOverlay('img/doloria.png', bounds).addTo(mymap);
mymap.fitBounds(bounds);
// DEBUG: Lat-Long alert
//mymap.on('click', function(ev) { alert(ev.latlng); })
</script>
</body>
</html>