Repository navigation
Expand file tree
/
Copy pathmap.tt2
More file actions
43 lines (42 loc) · 1.41 KB
/
Copy pathmap.tt2
File metadata and controls
43 lines (42 loc) · 1.41 KB
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
<!doctype html>
<html lang="en">
<head>
<title>Google Cloud Platform Region Map</title>
<link rel="canonical" href="[% site.url %]/map.html">
[% PROCESS favicon.tt2 %]
<link rel="stylesheet" href="[% site.leaflet.css %]">
<style>
html { width: 100%; height: 100%; }
body { width: 100%; height: 100%; margin: 0; padding: 0; }
</style>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex, nofollow">
<script src="[% site.leaflet.js %]"></script>
<body>
<div id="map" style="width: 100%; height: 100%"></div>
<script>
var map = L.map('map').setView([32, -10], 3);
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '<a href="/regions.html">☁️ gcloud-compute.com</a> | © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map);
[% FOREACH region IN regions; IF region.regionLat && region.regionLng %]
L.marker(
[
[% region.regionLat %],
[% region.regionLng %]
],
{
alt: '[% region.name %]'
}
).addTo(map).bindPopup(
'<p><strong><a href="/[% region.name %].html">[% region.name %]</a></strong></p>' +
'<p>' +
'[% countryFlag(region.regionLocationCountryCode) %] ' +
"[% IF region.regionLocationLong %][% region.regionLocationLong FILTER html %][% ELSIF region.regionLocation %][% region.regionLocation FILTER html %][% END %]" +
'</p>'
);
[% END; END %]
</script>
</body>
</html>