Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbrowser_example.html
More file actions
Latest commit
51 lines (38 loc) · 1.35 KB
/
Copy pathbrowser_example.html
File metadata and controls
51 lines (38 loc) · 1.35 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
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html><head>
<metacharset="utf-8">
<title>postcode_si - Pošte okoli točke</title>
<scripttype="text/javascript" src="./postcode_si.js"></script>
<scripttype="text/javascript">
/* This code will calculate codes using postcode_si lib. */
varshow_codes_around=function(some_point){
/* Retriving points near point */
varpoints_near=postcode_si.near(some_point)
for(varp=0;p<points_near.length;p++){
varpoint_wrap=document.createElement('li')
vartext=document.createTextNode(
points_near[p].postcode+" "+
points_near[p].town+" / "+
points_near[p].distance_from_origin+"m "+
points_near[p].org)
point_wrap.appendChild(text)
document.getElementById("postcode_near").appendChild(point_wrap)
}
}
window.onload=function(){
/* Just some point */
varsome_point=[46.11132565729796,14.508132934570312]
show_codes_around(some_point);
}
</script>
<styletype="text/css">
html,body { font-family: helvetica, sans-serif; font-size:100%; }
div.wrap{ max-width:600px; margin:0 auto; }
ul,ulli{ padding:0px; margin:0px; list-style: none }
</style>
</head>
<body><divclass="wrap">
<header><h1>postcode_si</h1><p>Pošte okoli točke (brez strežnika)</p></header>
<ulid="postcode_near"></ul>
</div></body>
</html>