Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use model.zoom on categorical/boolean snapshot instead of zoom level = 20 #212

Merged
merged 1 commit into from
Nov 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
use model zoom on categorical/boolean snapshot
  • Loading branch information
paulthatjazz committed Nov 24, 2023
commit a9ef149d42c54a5a3d02ea0c461bd900af0cd578
4 changes: 2 additions & 2 deletions app/javascript/projects/analysis_panel_tools/subsection.ts
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ export function extentToChartData(colors: Color[] | undefined, model: BooleanTil

if (model instanceof CategoricalTileGrid) {

const area = getArea(fromExtent(tileGrid.getTileCoordExtent([20, x, y]))) / 1000000
const area = getArea(fromExtent(tileGrid.getTileCoordExtent([model.zoom, x, y]))) / 1000000

const value = model.labels.get(model.get(x, y)) ? model.labels.get(model.get(x, y)) : "No Data"
const count = counts.get(value) || 0
@@ -58,7 +58,7 @@ export function extentToChartData(colors: Color[] | undefined, model: BooleanTil

} else {

const area = model instanceof NumericTileGrid ? 1 : getArea(fromExtent(tileGrid.getTileCoordExtent([20, x, y]))) / 1000000
const area = model instanceof NumericTileGrid ? 1 : getArea(fromExtent(tileGrid.getTileCoordExtent([model.zoom, x, y]))) / 1000000
const value = model.get(x, y)