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

Marker tap and info window offset problem

Open Jmaguerre opened this issue 9 years ago • 2 comments

Platform: Android Mapbox SDK version: 4.2.0-beta.5

Steps to trigger behavior

  1. Add a new marker to map.
  2. Tap marker

Expected behavior

Info window appears always at the same distance from the marker

Actual behavior

The first time I tap it appears correctly, following taps make the info window appear with an offset

This happens using the default icon and also the purple_marker custom example. There's also other thing I noticed, when using the default icon I have to tap above the icon in order to make the info window appear. I saw that the purple_marker.png file has more height than the actual marker. Is this on purpose for this tapping problem not to happen? I attach some screenshots to illustrate what I'm talking about.

First tap screen shot 2017-01-26 at 10 04 50

Second tap screen shot 2017-01-26 at 10 05 09

Default marker I need to tap on top of the marker for the info window to appear. This also is happening to me with other custom images different than purple_marker.png.

screen_shot_2017-01-26_at_10_28_23

Also in this last screenshot you can notice that while having the same position the default marker appears a little bit below regarding the image than the custom marker but I think this is due to the purple_marker.png file having the transparent space at the bottom

purple_marker

Custom image screen shot 2017-01-26 at 10 53 44

Any idea on what's going on? Thanks

Jmaguerre avatar Jan 26 '17 13:01 Jmaguerre

@Jmaguerre not sure what is going on without seeing the code but normally a secondary click will close the InfoWindow. I'm guessing you are overriding some interface and managing the infowindow yourself? I think that you are hitting this issue because of https://github.com/mapbox/mapbox-gl-native/issues/3176 and https://github.com/mapbox/mapbox-gl-native/issues/6099. Both these issues have been resolved for the upcoming 5.0.0 release.

Re. touch surface of markers, see -> https://github.com/mapbox/mapbox-gl-native/issues/6761

Feel free to add some code to help look into this more, going to close this as I'm not able to reproduce this from our end. Thank you for reporting and feel free to reach out if you have any questions.

tobrun avatar Jan 31 '17 13:01 tobrun

Hi @tobrun thanks for looking into this, maybe I was not clear enough, a secondary click does close the infowindow, what I was trying to say was that the second time the infowindow is shown after clicking on the marker is when the infowindow is rendered with an offset.

I am not overriding any interface nor managing the infowindow myself. However, there is definitely something on my side that is causing this because I tried with a fresh project and it is not happening but I can't figure out why.

I'll continue to look into this and if I find anything I'll report it.

Thanks again.

Jmaguerre avatar Jan 31 '17 13:01 Jmaguerre