Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

activeicon should always be on top #236

Open
JeroenDeDauw opened this issue Sep 21, 2016 · 5 comments
Open

activeicon should always be on top #236

JeroenDeDauw opened this issue Sep 21, 2016 · 5 comments

Comments

@JeroenDeDauw
Copy link
Member

Reposted by @Rudloff at SemanticMediaWiki/SemanticMaps#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
Copy link
Member Author

JeroenDeDauw commented Jul 14, 2018

@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/ ?

@Rudloff
Copy link

Rudloff commented Jul 19, 2018

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

@JeroenDeDauw
Copy link
Member Author

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?

@Rudloff
Copy link

Rudloff commented Jul 19, 2018

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 😞

@JeroenDeDauw
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants