Skip to content

Commit

Permalink
fix confidence slider filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
tebben committed Sep 15, 2023
1 parent 2943a2e commit 1833be6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion viewer/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OvertureMaps PMTiles</title>
<script type="module" crossorigin src="./assets/index-445305de.js"></script>
<script type="module" crossorigin src="./assets/index-96c42f49.js"></script>
<link rel="stylesheet" href="./assets/index-008d17ac.css">
</head>
<body>
Expand Down
3 changes: 2 additions & 1 deletion viewer/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,8 @@ slider.addEventListener("input", function () {
return;
}

const confidence = Math.round(parseInt(slider.value) / 100);
const confidence = parseInt(slider.value) / 100;
console.log(confidence);
map.setFilter("places", [">=", ["get", "confidence"], confidence]);
map.setFilter("places-labels", [">=", ["get", "confidence"], confidence]);
confidenceValueElement.innerHTML = `${slider.value}%`;
Expand Down

0 comments on commit 1833be6

Please sign in to comment.