Skip to content

BDMS-864: fix map layer feature limits for water wells and locations layers#294

Open
ksmuczynski wants to merge 1 commit into
stagingfrom
kas-BDMS-864-fix-map-ui-well-record-feature-count
Open

BDMS-864: fix map layer feature limits for water wells and locations layers#294
ksmuczynski wants to merge 1 commit into
stagingfrom
kas-BDMS-864-fix-map-ui-well-record-feature-count

Conversation

@ksmuczynski

@ksmuczynski ksmuczynski commented Jun 12, 2026

Copy link
Copy Markdown

Why

This PR addresses the following problem / context:

  • The OcotilloUI map was capping OGC layer rendering at 5,000 features per layer.
  • That cap prevented users from seeing all available water_wells and locations records in the map.
  • Current data volume is already above the previous cap for locations and close to/exceeds it for water_wells.

How

Implementation summary - the following was changed / added / removed:

  • Added a shared high-count OGC layer limit configuration in useThingLayers.tsx.
  • Applied the higher paging / feature limits only to the locations and water_wells OGC map layers.
  • Left all other OGC map layers on their existing defaults to avoid increasing browser load across the board.

Notes

Any special considerations, workarounds, or follow-up work to note?

  • This change is frontend-only and affects OcotilloUI map behavior, not pygeoapi server limits.
  • The higher limits apply only to the map’s OGC layer loading path; they do not change direct GIS client behavior.
  • Features still need valid geometry to render in the UI.
  • If these collections continue to grow, the per-layer cap may need to be revisited again.

@github-actions

Copy link
Copy Markdown

Preview Deployment

Preview URL: https://preview-kas-bdms-864-fix-map-ui-well-record-feat-auejgdbofq-uc.a.run.app

Note: This preview uses the staging API endpoints.

@ksmuczynski ksmuczynski added the bug Something isn't working label Jun 12, 2026
@ksmuczynski ksmuczynski marked this pull request as ready for review June 12, 2026 16:34
@chasetmartin

Copy link
Copy Markdown
Collaborator

@ksmuczynski Nice! This change is working for me, I now see 9937 water wells, and 11148 locations. 2 of the locations are way outside NM like you mentioned, but that seems unrelated to this ticket.

@ksmuczynski

Copy link
Copy Markdown
Author

@chasetmartin Great! And yes, I confirmed that the three locations plotting outside of NM are the result of this PR being pushed to staging. The coords for these locations have been updated in production, so when this fix gets pushed there, it shouldn't be an issue.

label: locations.label,
color: '#607d8b',
enabled: locations.exists && isLayerActive('ogc-locations'),
...HIGH_COUNT_LAYER_LIMITS,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be simpler to increase the defaults in useOGCLayer.ts

pageSize = 1000,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jirhiker But wouldn't this apply to all layers, potentially slowing down the app?

@ksmuczynski ksmuczynski requested a review from jirhiker June 12, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants