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

Infoclick: Don't display duplicate marker #1131

Closed
jacobwod opened this issue Jul 5, 2022 · 3 comments
Closed

Infoclick: Don't display duplicate marker #1131

jacobwod opened this issue Jul 5, 2022 · 3 comments
Assignees
Labels
module:client/core Core functionality (not a plugin)
Milestone

Comments

@jacobwod
Copy link
Member

jacobwod commented Jul 5, 2022

As of #1034, there is a marker being shown when user clicks a spot in map. The purpose is to exactly indicate which point was clicked and it's especially relevant when it comes to polygons. See the example below: without the blue marker user wouldn't have any idea where the click occurred:
Skärmavbild 2022-07-05 kl  09 08 51

So this is extremely important for polygons.

But, if click occurs on a point (or line) layer, there will be a duplicate symbol. The reason for this is that we use the same marker image to both indicate where the click occurred and to mark the selected feature:

Skärmavbild 2022-07-05 kl  09 05 47

Proposed solution

There are at least two possible ways of solving this:
a. use a different image marker
b. only show the click marker if click resulted in polygon results

The second option, B, is somehow difficult to solve. There will be situations where we get responses from multiple type of layers. Shouldn't the marker be shown at all if at least one of the layers contains point features? How can we be sure that user isn't looking at the polygons and needs to see the click marker?

So, currently, the most feasible solution is A.

@jacobwod jacobwod added the module:client/core Core functionality (not a plugin) label Jul 5, 2022
@jacobwod jacobwod added this to the 3.x milestone Jul 5, 2022
@jacobwod jacobwod self-assigned this Jul 5, 2022
@jacobwod
Copy link
Member Author

jacobwod commented Jul 5, 2022

Here's one proposal.

A clear, blue ring indicates where click occurred on the polygon:
Skärmavbild 2022-07-05 kl  09 59 03

When it comes to points, the same blue ring is there, but it is non-disturbing now and the icon marker clearly dominates and shows the selected point feature:
Skärmavbild 2022-07-05 kl  10 13 05

@jacobwod
Copy link
Member Author

jacobwod commented Jul 5, 2022

I have an even better idea.

Let's use the existing settings in Admin UI.

Setting a marker URL, anchor, fill color etc will result in the specified icon to be printed in map. We will also respect the color setting! See example below (note that transparency is not used when tinting the icon color, though).

Skärmavbild 2022-07-05 kl  10 41 37
Skärmavbild 2022-07-05 kl  10 41 32

Note that for best result, a white icon should be used, otherwise the color tinting may lead to unexpected results.

@jacobwod jacobwod modified the milestones: 3.x, 3.11 Jul 7, 2022
jacobwod added a commit that referenced this issue Aug 8, 2022
- Settings in Admin UI should reflect the new functionality added in #1131.
@Hallbergs
Copy link
Member

Very nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:client/core Core functionality (not a plugin)
Projects
None yet
Development

No branches or pull requests

2 participants