Skip to content

[BUG] Setting a custom highlight color gets ignored #1072

@shawnboltz

Description

@shawnboltz

Context

When I set the highlight color for a layer, that is the color that should get used when hovering over an object.

Resulting behaviour, error message or logs

Despite explicitly setting a highlight color, the default highlight color gets used.

Environment

  • OS: Windows and Ubuntu
  • Browser: Edge and Firefox
  • Lonboard Version: 0.12.1 and master

Steps to reproduce the bug

I generated a map using the following code snippet and hovered over the polygon:

from shapely import Polygon
import geopandas as gpd
from lonboard import Map, PolygonLayer

coords = ((-107., 35.), (-107., 39.), (-105., 39.), (-105., 35.))
polygon = Polygon(coords)

gdf = gpd.GeoDataFrame({"name": ["my_shape"], "geometry": [polygon]})
layer = PolygonLayer.from_geopandas(gdf, get_fill_color="#FF000033", pickable=True, auto_highlight=True)
layer.highlight_color = [0, 255, 0]  # Should be bright green
map_ = Map(layer)
map_

I can attempt to take on fixing this one, but I'm still learning how ipywidget works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions