-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Description
Target Use Case
It would be great if there was some more options for the highlighting of features on your map. For example we'd like to outline the selected or hovered polygon rather than just fill it in with a different color. We're currently working around this by making a new "selected-item" layer every time you select something, but I think everyone would benefit from it being built into deck.gl instead
Proposal
We currently have highlightColor and that's your only option for stying a highlight. I think there's a couple options we could add:
- Simply add a new
highlightStyle: "fill" | "outline" | "both"option, and then a secondary option likehighlightOutlineWidth. hightlightStyle probably doesn't do anything on lines, but you could still increase the size of the outline width to get your highlighted line to pop out more - Add full customization similar to how the normal rendering of points/lines/polygons works:
2.1 - addhighlightFillColorandhighlightOutlineColor
2.2 - "style" is determined by if these are set or not. So you would just render the outline if that was set, or just the fill if that was set. And then if both are there you can make a nice highlight where the outline is 100% opacity and the fill is 30%
2.3 - addhighlightOutlineWidth, maybe all the scale, units, minPixels, etc from Line properties
With that 2nd option you can have something similar to this:

mfarrow701