-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
147 lines (134 loc) · 5.83 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html><html lang="pt-br">
<head><title>AFAcodes</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Logistic and Scientific geocode"/>
<meta name="keywords" content="geocode"/>
<meta name="author" content="AddressForAll"/>
<link rel="shortcut icon" type="image/png" href="/resources/img/address_for_all-01-colorful.ico.png" />
<style>
.youtube-video-container{position:relative;overflow:hidden;width:750px}
.youtube-video-container:after{display:block;content:"";padding-top:56.25%}
.youtube-video-container iframe{position:absolute;top:0;left:0;width:100%;height:100%}
</style>
<script>
function sel_jurL1(abbrev,optc) {
if (abbrev>'') {
let jL2dom = document.getElementById(optc+'_jurL2');
let fcall = "sel_jurL2(this.value,'"+optc+"')"
let s = '<select name="states" onchange="'+fcall+'"><option value="">-- States--</option>'
for ( var i of Object.keys(jurisdictions[abbrev]) ){
if (optc === 'wrk')
{
if (jurisdictions[abbrev][i]['work'])
{
s += '<option value="' + i + '">' + (abbrev != 'CO' ? i + ' - ' : '') + jurisdictions[abbrev][i]['name']
}
}
else
{
if (jurisdictions[abbrev][i]['draft'])
{
s += '<option value="' + i + '">' + (abbrev != 'CO' ? i + ' - ' : '') + jurisdictions[abbrev][i]['name']
}
}
}
jL2dom.innerHTML=s+"</select>"
let jL3dom = document.getElementById(optc+'_jurL3');
jL3dom.innerHTML=""
}
}
function sel_jurL2(abbrev,optc) {
let jL3dom = document.getElementById(optc+'_jurL3');
if (abbrev>'')
{
let country = document.getElementById(optc+'_jurL1').value;
let state = document.querySelector('#'+optc+'_jurL2 select').value;
let fcall = "sel_jurL3(this.value,'"+optc+"')"
let s = '<select name="cities" onchange="'+fcall+'"><option value="">-- Cities --</option>'
let lst = (optc=='wrk')? jurisdictions[country][state]['work']: jurisdictions[country][state]['draft'];
if (lst)
{
for ( var i of lst )
{
s += '<option>'+i
}
}
jL3dom.innerHTML=s+"</select>"
}
else
{
jL3dom.innerHTML=""
}
}
function sel_jurL3(abbrev,optc) {
let country = document.getElementById(optc+'_jurL1').value;
let state = document.querySelector('#'+optc+'_jurL2 select').value;
if (optc=='wrk' || (jurisdictions[country] && jurisdictions[country][state] && jurisdictions[country][state]['draft'].includes(abbrev)) || confirm("It is not working,\nit is only to see city at the map ok?"))
{
window.location.href = './' + country+'-'+state+'-'+abbrev
}
}
</script>
</head>
<body style="padding:1em">
<img src="https://afa.codes/resources/img/OSMcodes-logo.png" alt="Smiley face" style="float:right;width:30%;">
<p>The AFAcodes infrastructure <b>is under testing and construction</b>.</p>
<p><a href="./">AFA.codes</a> is the "AddressForAll Codes", and a project maintained by <a target="_blanck" href="https://AddressForAll.org/">AddressForAll Institute</a>.
</p>
<h2>Options</h2>
<p>AFAcodes are sovereign decisions of each country about its <a target="_blanck" title="see Wikipedia explanation on geocodes" href="https://en.wikipedia.org/wiki/Geocode">geocodes</a>,
and some countries are implementing it. Logistic and Scientific AFAcode applications are interoperable.
</p>
<p><b><i>Logistic AFAcodes</i></b>, by jurisdiction:
<ul>
<li>Work cases:
<select name="countries1" id="wrk_jurL1" onchange="sel_jurL1(this.value,'wrk')">
<option value="" selected="1">-- Country --</option>
<!-- <option value="BR">BR - Brazil</option> -->
<option value="CM">CM - Camarões</option>
<option value="CO">CO - Colombia</option>
</select> <span id="wrk_jurL2"></span> <span id="wrk_jurL3"></span>
<br/> </li>
<li>(draft) Full list, only for list-test:
<select name="countries2" id="sel_jurL1" onchange="sel_jurL1(this.value,'sel')">
<option value="">-- Country --</option>
<option value="BR">BR - Brazil</option>
<option value="CM">CM - Camarões</option>
<option value="CO">CO - Colombia</option>
<option value="EC">EC - Equador</option>
<option value="UY">UY - Uruguay</option>
</select> <span id="sel_jurL2"></span> <span id="sel_jurL3"></span>
</li>
</ul>
</p>
<p>(draft) <b><i>Scientific AFAcodes</i></b> and <i>scientific grid</i>, by country:
<ul>
<li><a href="./BR+D">Brazil</a>
<li><a href="./CM+9">Camarões</a>
<li><a href="./CO+08">Colombia</a>
<li><a href="./EC+08">Ecuador</a>
<li><a href="./UY+B">Uruguay</a>
</ul>
</p>
<hr/>
<div class="youtube-video-container"><iframe src="https://www.youtube.com/embed/KSxutg7PAjo" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe></div>
<hr/>
<p><small>Software version: <a href="https://wiki.addressforall.org/doc/osmc:Vers%C3%B5es">see the documentation on the wiki.</a></small></p>
<p align="right"><a href="./_talk/">Contact us</a></p>
<!--
<hr/>
<h2>Foundations</h2>
<p>The country's sovereign decisions are limited by mathematical constraints and statistical evidence:
<ul>
<li>The geographic projections are limited to Statistical applications: population census and DGGS standard need <a href="https://en.wikipedia.org/wiki/Equal-area_map">Equal Area projection</a>.
<li>The multiporpuse geocodes (postal and scientifi applications) demand hierarchical geocodes and hierarchical grids: they are limited to quadrilateral grids and base4 geocode internal representation.
<li>Compressed human-readable representation for base4 are only possible using base16h, or "hierarchical hexadecimals", as described at
https://ppkrauss.github.io/Sfc4q/
<li>
</ul>
</p>
-->
<script src="/resources/js/jurisdictions_select.js"></script>
<script src="/resources/js/def.js"></script>
</body></html>