diff --git a/src/main/resources/eu/simstadt/regionchooser/website/index.html b/src/main/resources/eu/simstadt/regionchooser/website/index.html index a6a3e14d885a1e21fed705b8ad3538a1aa496359..141a41524beaf026e85be61ea9e093e2ee7f7729 100644 --- a/src/main/resources/eu/simstadt/regionchooser/website/index.html +++ b/src/main/resources/eu/simstadt/regionchooser/website/index.html @@ -5,9 +5,8 @@ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <title>Simstadt Region Chooser</title> - <meta name="keywords" content="polygon,creator,google map,v3,draw,paint"/> - <meta name="description" - content="Google Map V3 Polygon Creator for Simstadt"/> + <meta name="keywords" content="region chooser,citygml,polygon,creator,extract,simstadt,buildings"/> + <meta name="description" content="RegionChooser for Simstadt"/> <link rel="stylesheet" type="text/css" href="style/style.css"/> <!-- Firebug for js console: @@ -24,7 +23,7 @@ <body> <div id="header"> <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> </ul> </div> diff --git a/src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js b/src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js index e8f96ca3d64153ea77576729076871d07d7576bd..ca7c51d17a83c4a9ad6610a51d24e7c202cb942d 100644 --- a/src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js +++ b/src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js @@ -17,22 +17,6 @@ var regionChooser = (function(){ $("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({ source: new ol.source.OSM() }); @@ -178,15 +162,8 @@ var regionChooser = (function(){ var sketch_percentage = Math.round(intersectionArea / polygonArea * 100); intersections.addFeature(intersection); var link = '<li>' - // TODO: Add checkbox + label + - // TODO: Add submit. // 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>'; - } else { - h = cyrb53(feature['name']); - link += '<input type="checkbox" id="citygml_' + h+ '" class="select_citygml"><label for="citygml_' + h + '">' + feature['name'] + '</label>'; - } + link += '<input type="checkbox" id="citygml_' + feature.getId() + '" class="select_citygml"><label for="citygml_' + feature.getId() + '">' + feature['name'] + '</label>'; link += " (" + citygml_percentage + "%"; if (sketch_percentage == 100) {