Open smalers opened 4 years ago
Based on the initial implementation, I think we need to step back and evaluate this more. Here are some issues:
Here are some ideas for the implementation:
highlightEnabled=true|false
that when specified enables highlighting for the layer. We could go back and update map configurations to turn this on for stream features, which is the main layer using that feature at this time. Of course, then there is the question of how to further configure the hover, such as color/fillColor/opacity/fillOpacity/weight. Using hoverEnabled=true
could default to yellow highlight as we have done. Does configuring the other properties require configuring an event handler with additional properties? Maybe we can get away with highlightEnabled
for now to turn on a default hover event handler behavior?I'm leaning toward defaulting a layer view's highlightEnabled
property to false
, and if set to true
in a map configuration it would turn on the default yellow highlighting. Therefore I would need to update map configurations to set the highlightEnabled=true
for stream reaches and other maps where I want that feature turned on. This is not too big of a deal. Setting the same property for a polygon layer would turn on highlighting similarly. For maps that have stream and basins, I would configure the streams to highlght but the polygons to not highlight - then we need a solution for users to click on something at runtime to turn on highlighting. Is it an icon next to the layer (like the info) or a tool on the far left of the legend that toggles the behavior on for all layers? This needs to be discussed and perhaps prototyped. We should be reviewing QGIS, ArcGIS online, and other tools. I would turn polygon highlighting on for some maps, such as counties so we could test that .
The new push has been merged with master. A geoLayerView now has the option to add a highlightEnabled
property, that when set to true will highlight a line with the color yellow, and a polygon with the fillColor yellow and fillOpacity 0.1.
It would be nice if polygon outlines highlighted in yellow when moused over, similar to line features. Some maps have a lot of polygons and it can be difficult to know what is being viewed. Once this is enabled, we can decide whether to keep it as the default. Then we can decide what to do with points.