Maps4HTML / MapML.js

A custom <mapml-viewer> and <layer-> element suite
https://maps4html.org/MapML.js/
Other
56 stars 16 forks source link

Fix feature outline on hover #919

Open AliyanH opened 8 months ago

AliyanH commented 8 months ago

When you hover over the features on the map given below, the outline in some places does not show properly due to overlap, we can get around this with messing with Z-index or dom order for the outline as required to show the outline at the top of DOM order at all times.

https://maps4html.org/experiments/api/geojson/

AliyanH commented 7 months ago

this issue is related to #940.

It appears SVG doesn't directly support z-index like CSS does (link). I played around by moving the hovered element to the end of its parent container. Since SVGs render the last element in the markup on top, and this seems to solve the issue, but may present another issue when features overlap. For discussion.