-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
81 lines (75 loc) · 3.22 KB
/
index.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Map of CivClassics</title>
<link rel="icon" href="https://ccmap.github.io/favicon.ico" />
<meta name="description" content="Worldmap for the CivClassics Minecraft server">
<!-- Use minimum-scale=1 to enable GPU rasterization -->
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, maximum-scale=1, minimum-scale=1">
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');ga('create', 'UA-89647054-1', 'auto');ga('send', 'pageview');</script>
</head>
<body>
<div id="app">
Loading...
</div>
<link rel="stylesheet" href="leaflet.css" />
<link rel="stylesheet" type="text/css" href="main.css">
<!-- add Roboto font: http://www.google.com/fonts#UsePlace:use/Collection:Roboto:400,300,500 -->
<script>
var WebFontConfig = {
google: { families: [ 'Roboto:400,300,500:latin' ] }
};
(function() {
var wf = document.createElement('script');
wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();
</script>
<script src="bundle.js"></script>
<script type="text/javascript">
function doStart(featureGroup) {
CivMap.start({
attribution: '<a href="https://github.com/ccmap/v2.0">ccmap.github.io/v2.0</a> | made by <a href="https://www.reddit.com/u/Gjum/">Gjum</a> | map data <a href="https://github.com/ccmap/ccmap.github.io/wiki/Contributors">contributed by players</a>',
tilesUrl: 'https://raw.githubusercontent.com/ccmap/tiles/master/',
borderCircleRadius: 13000,
basemaps: [
'terrain',
'height',
'night',
'biome',
'simple',
'light',
],
options: {
basemap: 'terrain',
installedPlugins: [
CivMap.FeaturesPlugin,
CivMap.WaypointsPlugin,
],
plugins: {
features: {
featureGroup: featureGroup,
},
},
},
}, function (ref) { window.civMap = ref; });
}
var jsonUrl = null;
location.hash.slice(1).split('#').map(function (part) {
let [key, vals] = part.split('=', 2);
if (key == 'json') jsonUrl = vals;
});
if (jsonUrl) {
CivMap.getJSON(jsonUrl, doStart);
} else {
var defaultFeatureGroup = { "features": [{ "properties": { "name": "Quadrant cross" }, "geometry": { "type": "line", "positions": [[[0, -11000], [0, -2000]], [[0, 11000], [0, 2000]], [[-11000, 0], [-2000, 0]], [[11000, 0], [2000, 0]]] } }, { "properties": { "name": "World border" }, "geometry": { "type": "circle", "radius": 13000, "center": [0, 0] } }], "properties": { "name": "Overlay" } };
doStart(defaultFeatureGroup);
}
</script>
</body>
</html>