Skip to content

Commit

Permalink
add maxZoom to BivariateLayerProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
sleeping-h committed Dec 16, 2024
1 parent 080fadb commit 202681a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ query BivariateLayerLegend($polygon: GeoJSON) {
name,
label,
emoji,
maxZoom,
description,
copyrights,
direction,
Expand All @@ -37,6 +38,7 @@ query BivariateLayerLegend($polygon: GeoJSON) {
name,
label,
emoji,
maxZoom,
description,
copyrights,
direction,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ List<BivariateLegendQuotient> bivariateLayerLegendQueryQuotientListToBivariateLe
@Mapping(target = "name", expression = "java(quotient.name())")
@Mapping(target = "label", expression = "java(quotient.label())")
@Mapping(target = "emoji", expression = "java(quotient.emoji())")
@Mapping(target = "maxZoom", ignore = true)
@Mapping(target = "maxZoom", expression = "java(quotient.maxZoom())")
@Mapping(target = "description", expression = "java(quotient.description())")
@Mapping(target = "copyrights", expression = "java(quotient.copyrights())")
@Mapping(target = "direction", expression = "java(quotient.direction())")
Expand Down Expand Up @@ -108,7 +108,7 @@ List<BivariateLegendQuotient> bivariateLayerLegendQueryQuotient1ListToBivariateL
@Mapping(target = "name", expression = "java(quotient1.name())")
@Mapping(target = "label", expression = "java(quotient1.label())")
@Mapping(target = "emoji", expression = "java(quotient1.emoji())")
@Mapping(target = "maxZoom", ignore = true)
@Mapping(target = "maxZoom", expression = "java(quotient1.maxZoom())")
@Mapping(target = "description", expression = "java(quotient1.description())")
@Mapping(target = "copyrights", expression = "java(quotient1.copyrights())")
@Mapping(target = "direction", expression = "java(quotient1.direction())")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ private Legend bivariateLegendFromOverlay(OverlayDto overlay) {
.map(quotient -> BivariateLegendQuotient.builder()
.name(quotient.getName())
.label(quotient.getLabel())
.maxZoom(quotient.getMaxZoom())
.direction(quotient.getDirection())
.unit(quotient.getUnit())
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ private void init() {
" 2021-11-06T20:59:29Z",
new BivariateLayerLegendQuery.X("Axis", "OSM objects (n/km²)", steps(0d, 1d, 2d, 1000d,
"label1", "label2", "label3", "label4"),
List.of(new BivariateLayerLegendQuery.Quotient("Quotient", "count", "OSM Objects", "🗺", "", List.of(), List.of(),
List.of(new BivariateLayerLegendQuery.Quotient("Quotient", "count", "OSM Objects", "🗺", 8, "", List.of(), List.of(),
new BivariateLayerLegendQuery.Unit("", "n", "n", "number")),
new BivariateLayerLegendQuery.Quotient("Quotient", "area_km2", "Area", "📐", "", List.of(), List.of(),
new BivariateLayerLegendQuery.Quotient("Quotient", "area_km2", "Area", "📐", 8, "", List.of(), List.of(),
new BivariateLayerLegendQuery.Unit("", "km2", "km²", "square kilometers"))),
List.of("count", "area_km2")),
new BivariateLayerLegendQuery.Y("Axis", "Population (ppl/km²)", steps1(0d, 10d, 20d, 10000d,
"label11", "label12", "label13", "label14"),
List.of(new BivariateLayerLegendQuery.Quotient1("Quotient", "population", "Population", "🐱", "", List.of(), List.of(),
List.of(new BivariateLayerLegendQuery.Quotient1("Quotient", "population", "Population", "🐱", 8, "", List.of(), List.of(),
new BivariateLayerLegendQuery.Unit1("", "ppl", "ppl", "people")),
new BivariateLayerLegendQuery.Quotient1("Quotient", "area_km2", "Area", "📐", "", List.of(), List.of(),
new BivariateLayerLegendQuery.Quotient1("Quotient", "area_km2", "Area", "📐", 8, "", List.of(), List.of(),
new BivariateLayerLegendQuery.Unit1("", "km2", "km²", "square kilometers"))),
List.of("population", "area_km2")),
List.of(new BivariateLayerLegendQuery.Color("OverlayColor", "A1", "rgb(111,232,157)"),
Expand Down

0 comments on commit 202681a

Please sign in to comment.