/
index.html
42 lines (38 loc) 路 1.54 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
---
title: "iD"
layout: default
---
<div class='pad4 center header clearfix'>
<h1>{{page.title}}</h1>
<h2 class='margin2 col8'><a href='http://mapbox.com/blog/new-map-editor-launches-openstreetmap/'>iD has officially launched.</a> Head over to <a href='http://www.openstreetmap.org/edit?editor=id'>openstreetmap.org to start mapping now with iD.</a></h2>
<p class='margin2 col8'>iD is open source. <a href="https://github.com/openstreetmap/iD">Start contributing on GitHub</a>.</p>
</div>
<div class='footer center pad4 col12'>
<ul>
<li>A project for <a href='http://www.openstreetmap.org/'>OpenStreetMap</a> funded by <a href='http://mapbox.com/blog/knight-invests-openstreetmap/'>The Knight Foundation</a></li>
<li>Released under the <a href='https://opensource.org/licenses/ISC'>ISC License</a></li>
</ul>
</div>
</div>
<script>
var instance = 'http://openstreetmap.us/iD/release/';
function geoSuccess(position) {
window.location = instance + '#' +
'map=19.00/' + position.coords.longitude + '/' + position.coords.latitude;
}
function geoError(position) {
window.location = instance;
}
document.getElementById('start-mapping').onclick = function() {
if (navigator.geolocation) {
this.className += ' loading';
// handle firefox's weird implementation
// https://bugzilla.mozilla.org/show_bug.cgi?id=675533
window.setTimeout(geoError, 4000);
navigator.geolocation.getCurrentPosition(geoSuccess, geoError);
} else {
geoError();
}
return false;
};
</script>