/[projects]/dao/DaoAdresseService/src/main/webapp/index.html
ViewVC logotype

Annotation of /dao/DaoAdresseService/src/main/webapp/index.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2457 - (hide annotations) (download) (as text)
Fri Mar 20 13:57:47 2015 UTC (9 years, 2 months ago) by torben
File MIME type: text/html
File size: 3303 byte(s)
switch to maven
1 torben 2274 <!DOCTYPE html>
2     <html>
3     <head>
4     <meta charset="ISO-8859-1">
5     <title>DAO Addresse Service</title>
6    
7     <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
8     <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
9    
10     <script>
11    
12     var logObj;
13    
14     function logEvent(t) {
15     logObj.innerHTML += t;
16     logObj.innerHTML += "<br>";
17     }
18    
19     function clearLog() {
20    
21     logObj.innerHTML = "";
22     }
23    
24    
25     $(document).ready( function() {
26     logObj = document.getElementById("simplelog");
27    
28     $("#okBtn").click( function() {
29     clearLog();
30    
31     var varBrugerid = $("#brugerid").val();
32     var varPostnr = $("#postnr").val();
33     var varAdresse = $("#adresse").val();
34    
35     logEvent("Postnr: " + varPostnr);
36     logEvent("Adresse: " + varAdresse);
37 torben 2276 logEvent("");
38 torben 2274
39     var obj = {
40     brugerid: varBrugerid,
41     postnr: varPostnr,
42     adresse: varAdresse
43     };
44    
45     $.get("search", obj, function(data) {
46     var xml = $(data);
47    
48     var status = xml.find("status").text();
49     logEvent("Status: " + status);
50 torben 2397 logEvent("Error: " + xml.find("error").text() );
51     logEvent("");
52    
53     logEvent("Distrikt: " + xml.find("distrikt").text() );
54     logEvent("Køreliste: " + xml.find("koreliste").text() );
55     logEvent("Kommunekode: " + xml.find("kommunekode").text() );
56     logEvent("Vejkode: " + xml.find("vejkode").text() );
57     logEvent("Bane: " + xml.find("dbkbane").text() );
58     logEvent("");
59 torben 2274
60 torben 2445 logEvent("Split: " + xml.find("vej").text() + " / " + xml.find("husnr").text() + " / " + xml.find("litra").text() + " / " + xml.find("etage").text() + " / " + xml.find("lejlighed").text());
61 torben 2397 logEvent("Gadeident: " + xml.find("gadeident").text() );
62     logEvent("Vejnavn: " + xml.find("vejnavn").text() );
63 torben 2442 logEvent("Position: " + xml.find("latitude").text() + "," + xml.find("longitude").text());
64 torben 2397 logEvent("Dækning: " + xml.find("daekning").text() );
65     logEvent("Distributør: " + xml.find("distributor").text() );
66 torben 2274
67 torben 2397 var afstand = xml.find("extafstand").text();
68     if (afstand != "") {
69     logEvent("Udv. Adresse: " + xml.find("extaddr").text() );
70     logEvent("Udv. Afstand: " + Number( afstand ).toFixed(3) );
71 torben 2291
72 torben 2397 }
73 torben 2389
74    
75 torben 2397 logEvent("Levenshtein: " + xml.find("levenshtein").text() );
76 torben 2389
77 torben 2397 logEvent("OSM: " + xml.find("osm").text() );
78     logEvent("OSM vej: " + xml.find("osmvej").text() );
79     logEvent("Google: " + xml.find("google").text() );
80     logEvent("Google vej: " + xml.find("googlevej").text() );
81    
82 torben 2274 });
83    
84     });
85    
86    
87     $("#resetBtn").click( function() {
88     clearLog();
89     });
90    
91     });
92    
93    
94     </script>
95    
96     <style>
97     body {
98     margin: 20px;
99     }
100     #simplelog {
101     position: absolute;
102     top: 30px;
103     left: 500px;
104     }
105     </style>
106    
107    
108     </head>
109     <body>
110    
111     <h2>DAO Addresse Service</h2>
112    
113     <div id="simplelog"></div>
114    
115     <table border="0">
116     <tr>
117     <td>Brugerid: </td>
118 torben 2276 <td><input type="text" name="brugerid" id="brugerid" value="test"></td>
119 torben 2274 </tr>
120     <tr>
121     <td>Postnr: </td>
122 torben 2376 <td><input type="text" name="postnr" id="postnr"></td>
123 torben 2274 </tr>
124     <tr>
125     <td>Adresse: </td>
126     <td><input type="text" name="adresse" id="adresse"></td>
127     </tr>
128     <tr>
129     <td>&nbsp;</td>
130     <td>
131     <button id="okBtn">Ok</button>
132     <button id="resetBtn">Reset</button>
133     </td>
134     </tr>
135    
136     </table>
137    
138    
139    
140    
141    
142     </body>
143     </html>

  ViewVC Help
Powered by ViewVC 1.1.20