-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmap.html
29 lines (29 loc) · 1.29 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
<html>
<head>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ==" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js" integrity="sha512-/Nsx9X4HebavoBvEBuyp3I7od5tA0UzAxs+j83KgC8PU0kgB4XiK4Lfe4y4cgBtaRJQEIFCW+oC506aPT2L1zw==" crossorigin=""></script>
</head>
<body>
<div id="map" style="height:400px;width:600px"></div>
<script>
var map = L.map('map', {
crs: L.CRS.Simple,
minZoom: -10
});
var bounds = [[-17066,-17066], [17066,17066]];
var image = L.imageOverlay('WorldmapOfWarcraft_RC3_sqr.jpg', bounds).addTo(map);
map.fitBounds(bounds);
// x,y
// invertir la Y siempre
// ¿por que tengo que hacer esto?
var m0fx = 9550; // vertical
var m0fy = 8050; // horizontal
var m1fx = 4100; // vertical
var m1fy = -10650; // horizontal
L.marker([-6376.69+m0fx,3563.98+m0fy]).addTo(map).bindPopup('burning exile');
L.marker([-6335.96+m0fx,3563.72+m0fy]).addTo(map).bindPopup('doc greg victor');
L.marker([-6147.18+m0fx,3413.65+m0fy]).addTo(map).bindPopup('berserker');
L.marker([-6494.85+m0fx,3218.53+m0fy]).addTo(map).bindPopup('shadow hunter');
</script>
</body>
</html>