-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
index.html
59 lines (52 loc) · 2.08 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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>iD</title>
<link rel='stylesheet' href='dist/iD.css'>
<link rel='icon' type='image/png' href='data:image/png;base64,iVBORw0KGgo='>
<meta name='viewport' content='width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no'/>
<meta name='mobile-web-app-capable' content='yes'/>
<meta name='apple-mobile-web-app-status-bar-style' content='black-translucent'/>
<style type='text/css'>
/* apply document-level styling to standalone iD only */
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
/* disable elastic page bounce upon scroll */
overflow: hidden;
}
</style>
</head>
<body>
<div id='id-container'></div>
<script>
var container = document.getElementById('id-container');
var newScript = document.createElement('script');
newScript.type = 'text/javascript';
newScript.onload = checkScript;
newScript.onerror = checkScript;
newScript.src = 'dist/iD.js';
document.getElementsByTagName('head')[0].appendChild(newScript);
function checkScript() {
if (typeof iD === 'undefined' || !iD.utilDetect().support) {
container.innerHTML = 'Sorry, your browser is not currently supported. Please use another <a href="https://github.com/openstreetmap/iD#basics">browser</a> or <a href="https://wiki.openstreetmap.org/wiki/Editors">editor</a> to contribute to the map.';
container.style.padding = '20px';
} else {
var context = iD.coreContext()
.assetPath('dist/')
.containerNode(container);
window.context = window.id = context; // for debugging
context.init();
// disable boundaries (unless we have an explicit disable_features list)
var q = iD.utilStringQs(window.location.hash);
if (!q.hasOwnProperty('disable_features')) {
context.features().disable('boundaries');
}
}
}
</script>
</body>
</html>