This repository has been archived by the owner on Feb 11, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmap.html
64 lines (54 loc) · 1.66 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
layout: page
title: Screeps Alliance Map
sitemap:
priority: 1.0
changefreq: weekly
---
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<link rel="stylesheet" href="/css/loan-map.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="/js/ScreepsConstants.js"></script>
<script src="/js/ScreepsRegion.js"></script>
<script src="/js/ScreepsMap.js"></script>
<div id="ScreepsMapTooltip" style="display: none;">
<dl>
<dt>Room:</dt>
<div class="roomName"></div>
<dt>Type:</dt>
<div class="roomType"></div>
<dt>RCL:</dt>
<div class="roomLevel"></div>
<dt>Owner:</dt>
<div class="roomOwner"></div>
<dt>Alliance:</dt>
<div class="roomAlliance"></div>
</dl>
</div>
<div id="ScreepsMapFlex">
<div id="ScreepsMapContainer"></div>
<div>
<span id="ScreepsColorKeyContainer"></span>
</div>
</div>
<script type="text/javascript" language="javascript">
window.onload = function() {
let region = new ScreepsRegion("W70N70", "E70S70");
let mapView = new ScreepsMap(
{
spinnerHostId: "ScreepsMapFlex",
mapHostId: "ScreepsMapContainer",
legendHostId: "ScreepsColorKeyContainer",
roomTooltipHostId: "ScreepsMapTooltip",
terrainUri: "img/screeps_terrain.png",
region: region,
style: { 'room-padding': 10 }
});
mapView.setData(
{{ site.data.rooms | jsonify }},
{{ site.data.alliances | jsonify }}
);
mapView.render();
}
</script>
</div>