visgl / visgl/deck.gl

pyDeck layer HexagonLayer numerous bugs - tooltips, get_position

Open
#8,697 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

in HexagonLayer style of pdk.Layer there are bugs with tooltip and point locations.

  1. tooltip is displaying wrong. Instead of values, it is be param name. There are numerous reports about the problem, but it still exist in the Hexagon implementation.
  2. if data contains wrong Lon/Lat value (as example, [129.0, 34.0], whole layer will not be visible.

funny situation, if you set layer type to 'ColumnLayer', the same dataset and parameters will be displayed correctly.

the setting I am using in my app:

tooltip = {'html': 'Place: {place_name}</br>Rents: {rents}'}

pdk.Layer(
                type='ColumnLayer',    # 'HexagonLayer',
                data=rents_map,
                get_position='[lon, lat]',
                get_evelation='rents',
                get_elevation_weight='rents',
                elevation_scale=10,
                elevation_range=[0, max_range],
                pickable=True,
                extruded=True,
                )

pdk.Deck(
                map_provider='mapbox',
                map_style=None,  
                initial_view_state={
                    'latitude': 35.70,
                    'longitude': 37.60,
                    'zoom': 9,
                    'pitch': 50
                },
                layers=[map_layers],
                tooltip=tooltip,
            )
Flavors
  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CartoLayer
  • ArcGIS
Expected Behavior

expecting the same picture as it is for ColumnLayer but with HexagonLayer

Steps to Reproduce
  1. to reproduce not visible data - just set any gps value in the dataset with wrong value
  2. to show the problem with tooltip - I can't find specific steps. It simply doesn't work for me. But as I said - if you switch to ColumLayer type, everything is working fine. With HexagonLayer - tooltip are wrong (no data).
    they will be displayed as plant text:
Place: {place_name}
Rents: {rents}
Environment
  • Framework version: pydeck 0.8.1b0
  • Browser: Chrome, Ssfari
  • OS: Windows 11, MacOS 14.2.1
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 at the pydeck HexagonLayer entry point and compare its tooltip and get_position handling with ColumnLayer using the supplied configuration. Reproduce the literal tooltip output and the missing layer caused by an invalid longitude or latitude, then verify that HexagonLayer displays the expected values and handles the coordinate case consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, typescript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.