Commit 1f678d58 authored by Eric Duminil's avatar Eric Duminil
Browse files

Just an example with radio buttons

No related merge requests found
Showing with 18 additions and 5 deletions
+18 -5
...@@ -9,6 +9,22 @@ var regionChooser = (function(){ ...@@ -9,6 +9,22 @@ var regionChooser = (function(){
$("html").addClass("wait"); $("html").addClass("wait");
} }
// Hash function
const cyrb53 = (str, seed = 0) => {
let h1 = 0xdeadbeef ^ seed,
h2 = 0x41c6ce57 ^ seed;
for (let i = 0, ch; i < str.length; i++) {
ch = str.charCodeAt(i);
h1 = Math.imul(h1 ^ ch, 2654435761);
h2 = Math.imul(h2 ^ ch, 1597334677);
}
h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^ Math.imul(h2 ^ (h2 >>> 13), 3266489909);
h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^ Math.imul(h1 ^ (h1 >>> 13), 3266489909);
return 4294967296 * (2097151 & h2) + (h1 >>> 0);
};
var osm_layer = new ol.layer.Tile({ var osm_layer = new ol.layer.Tile({
source: new ol.source.OSM() source: new ol.source.OSM()
}); });
...@@ -160,7 +176,8 @@ var regionChooser = (function(){ ...@@ -160,7 +176,8 @@ var regionChooser = (function(){
link += "<a href=\"#\" onclick=\"regionChooser.downloadRegionFrom" + feature["source"] + "(" + feature.getId() link += "<a href=\"#\" onclick=\"regionChooser.downloadRegionFrom" + feature["source"] + "(" + feature.getId()
+ ");return false;\">" + feature["name"] + "</a>"; + ");return false;\">" + feature["name"] + "</a>";
} else { } else {
link += feature['name']; h = cyrb53(feature['name']);
link += '<input type="checkbox" id="check' + h+ '"><label for="check' + h + '">' + feature['name'] + '</label>';
} }
link += " (" + citygml_percentage + "%"; link += " (" + citygml_percentage + "%";
......
...@@ -130,10 +130,6 @@ div#dataPanel li { ...@@ -130,10 +130,6 @@ div#dataPanel li {
line-height: 1; line-height: 1;
} }
div#side input{
width:90%;
}
div#side input.navi{ div#side input.navi{
font-size:18px; font-size:18px;
height:30px; height:30px;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment