Skip to content

Commit aae30f8

Browse files
ajrothwellclaude
andcommitted
respect classBreaks minValue and lastClassMaxValue in WHERE clauses
ArcGIS classBreaks renderers with no defaultSymbol don't render features outside the minValue..lastClassMaxValue range. The split layer WHERE clauses now bound the first group at minValue and cap the last group at lastClassMaxValue to match this behavior. For PlowPHL Treated Street Status (minValue=35): - Before: symbol <= 360 / symbol > 360 - After: symbol >= 35 AND symbol <= 360 / symbol > 360 AND symbol <= 25000 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ea4f97f commit aae30f8

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@phila/layerboard",
3-
"version": "3.0.0-beta.25",
3+
"version": "3.0.0-beta.26",
44
"type": "module",
55
"description": "Vue 3 + MapLibre mapping framework for City of Philadelphia applications",
66
"main": "./dist/index.js",

src/utils/webmap-transformer.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,11 +680,17 @@ function convertClassBreaksRenderer(renderer: EsriRenderer, layerOpacity?: numbe
680680
const lowerBound = g === 0 ? null : groups[g - 1]!.breaks[groups[g - 1]!.breaks.length - 1]!.classMaxValue;
681681
const upperBound = breaks[breaks.length - 1]!.classMaxValue;
682682
let whereClause: string;
683+
const hasDefaultSymbol = !!renderer.defaultSymbol;
683684
if (lowerBound === null) {
684-
whereClause = `${field} <= ${upperBound}`;
685-
} else if (g === groups.length - 1) {
685+
// First group: exclude features below minValue when no defaultSymbol
686+
const minBound =
687+
!hasDefaultSymbol && renderer.minValue != null ? `${field} >= ${renderer.minValue} AND ` : "";
688+
whereClause = `${minBound}${field} <= ${upperBound}`;
689+
} else if (g === groups.length - 1 && hasDefaultSymbol) {
690+
// Last group with defaultSymbol: open-ended above
686691
whereClause = `${field} > ${lowerBound}`;
687692
} else {
693+
// Middle groups, or last group without defaultSymbol: bounded range
688694
whereClause = `${field} > ${lowerBound} AND ${field} <= ${upperBound}`;
689695
}
690696

0 commit comments

Comments
 (0)