Maps icon indicating copy to clipboard operation
Maps copied to clipboard

activeicon should always be on top

Open JeroenDeDauw opened this issue 7 years ago • 5 comments

Reposted by @Rudloff at https://github.com/SemanticMediaWiki/SemanticMaps/issues/88:

When using the leaflet format the active icon is not always drawn on top of the other icons. This means it is sometimes not visible if we have a lot of markers.

JeroenDeDauw avatar Sep 21 '16 06:09 JeroenDeDauw

@Rudloff is this still an issue with the latest version? And if so, can you create a demonstration of the issue on https://sandbox.semantic-mediawiki.org/ ?

JeroenDeDauw avatar Jul 14 '18 17:07 JeroenDeDauw

Here is an example: https://sandbox.semantic-mediawiki.org/wiki/Issue/M/236

There are two icons with the same coordinates (Activeicon Test and Issue/M/236, both near Berlin). Activeicon Test (red icon) is displayed on top, but IMHO the activeicon (green icon) should always be displayed on top.

Expected result

image

Actual result

image

Rudloff avatar Jul 19 '18 10:07 Rudloff

I just found out there is an activeicon parameter part of the map result format :) Lets make sure I understand this correctly. So the query puts two markers on the same place, both using the default (red) marker icon. Then the visitedicon parameter changes the icon of any marker you click. When you click on the overlapping markers, the bottom (hidden) one is activated, shows its popup and changes its icon. Instead this should happen for the top one. Correct?

JeroenDeDauw avatar Jul 19 '18 11:07 JeroenDeDauw

activeicon is different from visitedicon. activeicon means the current page has a different icon.

For example, on our wiki, we use this to show users where is the place they are currently reading about: image (The big marker is the current place, smaller markers are other places around it.)

However, if several pages have the same coordinates (or close enough coordinates), the active icon is sometimes overlapped by other icons and this can be confusing for users (because then they can't find the current page on the map). Which is why I think the current page should always be on top.

In the example I provided, there are two markers with the same coordinates but with different icons and which one is on top seems to be random (or depend on the sort order maybe?). The green one (the activeicon) should be on top.

Sorry if I wasn't clear enough :disappointed:

Rudloff avatar Jul 19 '18 12:07 Rudloff

Right ok. What I guessed was going on is not happening, at least not when using display_map. The icon you see is the one you interact with. https://www.semantic-mediawiki.org/wiki/User:Jeroen_De_Dauw/issue_236

Markers that get added later are added on top of the ones already added, so yes, the sort order will affect this. However it should be possible to have the activeicon be added last and thus always be on top.

JeroenDeDauw avatar Jul 19 '18 12:07 JeroenDeDauw