visgl / visgl/deck.gl

DataFilterExtension (category) and PathStyleExtension not working together

Open
#9,253 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
14.6k
Forks
2.3k
Avg merge
2d 9h
Merged PRs (30d)
42

Description

Description

When added PathStyleExtension with DataFilterExtension filtering with category the line is not visible however it works when I use range filter

Before adding DataFilterExtension
image

image

After adding DataFilterExtension

image

image

Flavors
  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CartoLayer
  • ArcGIS
Expected Behavior

Line should be visible using both extension

Steps to Reproduce

return new GeoJsonLayer({
id: 'cable',
useDevicePixels: app.useDevicePixelsInVectorLayer,
data: app.filterDataWithProvinceGeom(app.cableFilteredGeoJson, "FeatureCollection","CBL"), //app.cableFilteredGeoJson,
lineWidthScale: 1,
lineWidthUnits: 'pixels',
lineWidthMinPixels: 1,
lineWidthMaxPixels: 10,
getLineColor: f => app.GetLineColor(f),
getLineWidth: feature => app.GetLineWidth(feature),
opacity: styleObj[0].LayerStyle[0].opacity,
autoHighlight: true,
pickable: true,
visible: app.isVectorLayerActive("CBL"),
getFilterCategory: f => f.properties.network_status,
filterCategories: app.GetfilterCategories("CBL"),
extensions: [new PathStyleExtension({ highPrecisionDash: false, dash: true, dashJustified: true }), new DataFilterExtension({ categorySize: 1 })],
getDashArray: f => (app.GetDashArray(f.properties.network_status)),
collisionEnabled: app.IsCollisionEnabled,

Environment
  • Framework version: deck.gl@9.0.35
  • Browser: Chrome 130.0.6723.117
  • OS: Windows 11
Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the provided GeoJsonLayer configuration with DataFilterExtension and PathStyleExtension in the GoogleMapsOverlay flavor, using the stated deck.gl and browser versions. Compare category filtering with range filtering; done means the line remains visible when both extensions are enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.