developmentseed / developmentseed/lonboard

[BUG] Tooltip not showing on the stroke of non-filled polygons

Open
#1,110 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
964
Forks
54
Avg merge
5m
Merged PRs (30d)
1

Description

## Context

Tooltip not showing when hovering over.

## Resulting behavior, error message or logs

No tooltip is appearing for `PolygonLayer`:

Image


But it does for `ScatterplotLayer`:
Image

## Environment

- OS: macOS Sequoia
- Browser: VSCode notebook
- Lonboard Version: 0.14.0

## Steps to reproduce the bug

```python
import geopandas as gpd
import lonboard
import shapely as shp

lonboard.Map(
layers=lonboard.PolygonLayer.from_geopandas(
gdf=gpd.GeoDataFrame(
data={"name": ["BBOX"]},
geometry=[
shp.Polygon.from_bounds(
xmin=-77.14385447296375,
ymin=38.81777352822358,
xmax=-76.91327614087643,
ymax=38.997931216647345,
)
],
crs="4326",
),
filled=False,
line_width_units="pixels",
),
basemap=lonboard.basemap.MaplibreBasemap(style=lonboard.basemap.CartoStyle.Voyager),
show_tooltip=True,
)

lonboard.Map(
layers=lonboard.ScatterplotLayer.from_geopandas(
gdf=gpd.GeoDataFrame(
data={"name": ["Radius"]},
geometry=gpd.GeoSeries.from_xy(
x=[-77.04561819829546],
y=[38.9079099896949],
crs="4326",
),
),
filled=False,
get_radius=10_000,
line_width_units="pixels",
stroked=True,
),
basemap=lonboard.basemap.MaplibreBasemap(style=lonboard.basemap.CartoStyle.Voyager),
show_tooltip=True,
view_state={"zoom": 10, "latitude": 38.9079099896949, "longitude": -77.04561819829546},
)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the provided VSCode notebook reproduction with PolygonLayer and compare its tooltip behavior with the working ScatterplotLayer example. Trace the PolygonLayer behavior for non-filled polygons and verify that hovering the stroke shows the tooltip while preserving the existing filled-polygon behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.