forked from monsooncollective/yatayat
-
Notifications
You must be signed in to change notification settings - Fork 3
/
osmroutenames.html
38 lines (38 loc) · 1.12 KB
/
osmroutenames.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
<html>
<head>
<title> Kathmandu Public Transport </title>
<style>
body {
margin:0;
background-color: black;
color: #00ff00;
font-family: courier, mono;
}
</style>
</head>
<body>
<script src="lib/jquery-1.7.2.min.js"></script>
<script src="lib/underscore-min.js"></script>
<script src="yatayat.js"></script>
<script src="config.js"></script>
<script type="text/javascript" language="javascript">
var osmdata;
$.ajax({ type: YY.GET_OR_POST, url: YY.API_URL,
data: YY.QUERY_STRING,
dataType: 'text',
success: function(data) {
osmdata = data;
var $t = $("<table>")
.appendTo($(document.body));
YY.fromOSM(data).routes.forEach(function(route) {
var $r = $("<tr>")
.append($("<td>")
.html(route.id))
.append($("<td>")
.html(route.name))
.appendTo($t);
});
}});
</script>
</body>
</html>