-
Notifications
You must be signed in to change notification settings - Fork 1
/
map.php
46 lines (42 loc) · 1.09 KB
/
map.php
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
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8"/>
<style type="text/css">
#map {
background: #0B6138;
position: absolute;
}
#map div {
width: 7px;
height: 7px;
float: left;
}
#map div:nth-child(<?php echo $map->getGrid()->getSizeX(); ?>n+<?php echo $map->getGrid()->getSizeY() + 1; ?>) {
clear: left
}
.layers {
position: relative;
}
.layer {
border: 1px solid #484;
position: absolute;
}
</style>
</head>
<body>
<div id="map">
<?php foreach ($map->getGrid() as $coordinates): ?>
<?php list($x, $y) = $coordinates; ?>
<div>
<div class="layers">
<?php foreach ($map->getLayerVisualisers() as $visualiser): ?>
<?php echo $visualiser->renderCell($x, $y); ?>
<?php endforeach; ?>
</div>
</div>
<?php endforeach; ?>
</div>
</body>
</html>