pyDeck layer HexagonLayer numerous bugs - tooltips, get_position
Nobody has claimed this yet.
- 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.
- 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.
- 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
- to reproduce not visible data - just set any gps value in the dataset with wrong value
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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