Commit 7ea7f80a authored by Eric Duminil's avatar Eric Duminil
Browse files

HTML update

parent 9d451409
...@@ -5,9 +5,8 @@ ...@@ -5,9 +5,8 @@
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<title>Simstadt Region Chooser</title> <title>Simstadt Region Chooser</title>
<meta name="keywords" content="polygon,creator,google map,v3,draw,paint"/> <meta name="keywords" content="region chooser,citygml,polygon,creator,extract,simstadt,buildings"/>
<meta name="description" <meta name="description" content="RegionChooser for Simstadt"/>
content="Google Map V3 Polygon Creator for Simstadt"/>
<link rel="stylesheet" type="text/css" href="style/style.css"/> <link rel="stylesheet" type="text/css" href="style/style.css"/>
<!-- Firebug for js console: <!-- Firebug for js console:
...@@ -24,7 +23,7 @@ ...@@ -24,7 +23,7 @@
<body> <body>
<div id="header"> <div id="header">
<ul> <ul>
<li class="title"><span id="repo_path"></span></li> <li class="title"><span id="repo_path">RegionChooser</span></li>
<li class="title" id="select_repository" style="visibility:hidden"><button onclick="regionChooser.selectRepository()">Select repository</button></li> <li class="title" id="select_repository" style="visibility:hidden"><button onclick="regionChooser.selectRepository()">Select repository</button></li>
</ul> </ul>
</div> </div>
......
...@@ -17,22 +17,6 @@ var regionChooser = (function(){ ...@@ -17,22 +17,6 @@ var regionChooser = (function(){
$("html").addClass("wait"); $("html").addClass("wait");
} }
// Hash function. For testing purposes in browser (no Feature ID is available)
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()
}); });
...@@ -178,15 +162,8 @@ var regionChooser = (function(){ ...@@ -178,15 +162,8 @@ var regionChooser = (function(){
var sketch_percentage = Math.round(intersectionArea / polygonArea * 100); var sketch_percentage = Math.round(intersectionArea / polygonArea * 100);
intersections.addFeature(intersection); intersections.addFeature(intersection);
var link = '<li>' var link = '<li>'
// TODO: Add checkbox + label +
// TODO: Add submit.
// TODO: If possible, highlight the corresponding polygon when hovering above a name. // TODO: If possible, highlight the corresponding polygon when hovering above a name.
if (fromJavaFX) {
link += '<input type="checkbox" id="citygml_' + feature.getId() + '" class="select_citygml"><label for="citygml_' + feature.getId() + '">' + feature['name'] + '</label>'; link += '<input type="checkbox" id="citygml_' + feature.getId() + '" class="select_citygml"><label for="citygml_' + feature.getId() + '">' + feature['name'] + '</label>';
} else {
h = cyrb53(feature['name']);
link += '<input type="checkbox" id="citygml_' + h+ '" class="select_citygml"><label for="citygml_' + h + '">' + feature['name'] + '</label>';
}
link += " (" + citygml_percentage + "%"; link += " (" + citygml_percentage + "%";
if (sketch_percentage == 100) { if (sketch_percentage == 100) {
......
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