Skip to content

POC: Add splitter support for vector data in leaflet#7788

Open
zoran995 wants to merge 2 commits intosplit-points-billboardsfrom
vector-split-leaflet
Open

POC: Add splitter support for vector data in leaflet#7788
zoran995 wants to merge 2 commits intosplit-points-billboardsfrom
vector-split-leaflet

Conversation

@zoran995
Copy link
Collaborator

What this PR does

Fixes #

Adds splitter support for points and billboards in Leaflet (2D mode). #7673 adds support for the splitter only in Cesium and this PR extends this support to Leaflet.

Approach: Each LeafletGeomVisualizer creates a dedicated Leaflet pane. All its layers (markers, circle markers, polylines, polygons) render into that pane. When splitting is active, CSS clip-path: polygon() is applied to the pane element — the same technique used for imagery tile layers.

Changes:

  • Extracted shared getClipsForSplitter utility from duplicated code in ImageryProviderLeafletTileLayer and ImageryProviderLeafletGridLayer
  • Modernised from deprecated CSS clip: rect() to clip-path: polygon() across all splitter consumers
  • Added per-visualizer custom panes with @observable splitDirection / splitPosition and MobX autorun to LeafletGeomVisualizer
  • Extended Leaflet._reactToSplitterChanges() to propagate split state to data source visualizers

Test me

  1. Add a CSV or GeoJSON point dataset
  2. Switch to 2D (Leaflet) mode
  3. Enable the splitter
  4. Set the dataset to LEFT or RIGHT split direction
  5. Verify points/billboards clip at the split line
  6. Drag the splitter — verify clipping updates in real time
  7. Verify imagery layer splitting still works (no regressions)

Checklist

  • There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
  • I've updated relevant documentation in doc/.
  • I've updated CHANGES.md with what I changed.
  • I've provided instructions in the PR description on how to test this PR.

@zoran995 zoran995 requested a review from na9da February 27, 2026 22:38
@zoran995 zoran995 changed the base branch from main to split-points-billboards February 27, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant