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

Multiple Markers on Android #29

Open
Shalwaban opened this issue Mar 13, 2021 · 4 comments
Open

Multiple Markers on Android #29

Shalwaban opened this issue Mar 13, 2021 · 4 comments

Comments

@Shalwaban
Copy link

On multiple Android devices, when 2 Features with unique ID's are defined, onFeatureClicked is not responding.
If the Features have the same ID, behavior is as expected.
On Desktop and iOS, Features with unique ID's also behave as expected when clicked.

https://glitch.com/edit/#!/0309b

@felixpalmer
Copy link
Owner

I don't have an Android device to handle to test on sorry, so I cannot reproduce this. However, I spent a lot of time working on fixing picking on Android recently and did have it working. Could you double check that the production build you are testing with is indeed using the latest 1.0.17 version of the code? I ask because the glitch.com demo you sent doesn't display the icons correctly, so I figured it isn't actually what you are testing with.

Also, could you check whether clicking works for you on this demo? https://olwal.github.io/air/3d/ - this is what I was helping to fix and I've been told it now works correctly on Android

@Shalwaban
Copy link
Author

The air/3d demo works for me on Android using Firefox, but not Chrome.
So then I tested my glitch example on Android/Firefox and it works! And it still doesn't work on Android/Chrome.
(In the glitch demo I switched the icons to white, they might have been hard to see when no map was loaded)

@felixpalmer
Copy link
Owner

felixpalmer commented Mar 16, 2021

One thing to bear in mind is that the markers are actually bigger than you think because you have added a padding (set a background to a solid colour to see this, say "background": "blue"). This means that when they are close by they will overlap when hittesting even if the white circles do not.

Screen Shot 2021-03-16 at 11 33 52 AM

I've had a look at the code and made a slight tweak that might fix this for you - can you try with the latest version (1.0.18)?

As for debugging this further - who knows what is up with Android/Chrome here. To help narrow down the exact issue could you try and see if it is broken or works on Android/Chrome in the following cases:

  • Overlay with one point with id of 0
  • Overlay with one point with id of 1
  • Overlay with one point with id of "test"
  • Overlay with two points with ids of 0 & 0 respectively
  • Overlay with two points with ids of 0 & 1 respectively
  • Overlay with two points with ids of "test" & "test2" respectively

@Shalwaban
Copy link
Author

Shalwaban commented Mar 17, 2021

Thanks for the info about the padding.

With 1.0.18 / Android 6 / Chrome 89:

  • Overlay with one point with id of 0
  • Overlay with one point with id of 1
  • Overlay with one point with id of "test"
  • Overlay with two points with ids of 0 & 0 respectively
  • Overlay with two points with ids of 0 & 1 respectively
  • Overlay with two points with ids of "test" & "test2" respectively

On Firefox, all benchmarks passed.

https://glitch.com/edit/#!/0316s

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

No branches or pull requests

2 participants