mapbox-gl-native icon indicating copy to clipboard operation
mapbox-gl-native copied to clipboard

Custom marker not easy to click

Open vruc opened this issue 10 years ago • 3 comments

Using Mapbox Android SDK

Mapbox SDK version: 4.0.0

I'm developing a tracker app, which requires to update the same marker indicates user's home location.

When I use custom marker icon, I find it not easy to click the marker, but If when I use default marker, I can click it 100%.

Finally I find out if I click the marker inside the default marker area, I can click it 100%, but if I click the marker outside of default marker area, then the custom marker will not response for my click.

This is the compare image to show the size of default marker and my custom marker. Image of Markers

Thanks in advance

vruc avatar Apr 19 '16 09:04 vruc

@vruc Thank you for reaching out and reporting your problem. With the 4.0.0 version of the library the touch area was not dynamically calculated, we just added a fixed padding to the xy coordinates returned from onTouch listener. With the upcoming 4.1.0 release we tried improving this experience by taking in account the width/height of the used icons.

You can read more about this in https://github.com/mapbox/mapbox-gl-native/issues/3643.

tobrun avatar Apr 19 '16 15:04 tobrun

@tobrun Thanks for your answer, I am look forward to the new version 4.1.0.

vruc avatar Apr 20 '16 02:04 vruc

If you like you can test out the 4.1.0 version through our SNAPSHOT. Reach out if you have any other questions or remarks. Closing this issue as this will be handled in 4.1.0.

tobrun avatar Apr 21 '16 06:04 tobrun