You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Adjust InfoWindow triangle for edge of screen annotations #2273
If an annotation is near the edge of the screen so the InfoWindow gets pushed over to stay on the screen the triangle no longer aligns with the marker:
Somehow the triangle should be moved to stay in line with the marker.
The InfoWindow/callout view should move with the map and stay within the viewport while accounting for margins/etc. Eventually we'll implement this on iOS, but so far we haven't — instead we hide it on pan.
Based on info given above, I wil add the same functionality as iOS.
Will create a issue for this so we can close this one after the PR.
EDIT: while trying to get it to work I'm noticing lag which results in a bad ux, I will create another ticket for working on annotations in general. While working on that I will pick up this issue automatically
To be clear, iOS is hiding the callout on any viewport change because we don't have a good system in the sub-project that we use for callouts (which are rather complex and MapKit-like) to reposition without re-displaying. So mirroring iOS behavior would not track the map.
I do think we should not track the map on Android until we solve the sync problems with the user dot as described elsewhere. then we can move the info window with the map, too, which is more complex and requires re-layout when hitting the map edge, etc.
Adapted InfoWindow provided by end developer (InfoWindowAdapter)
I did not implement the margin/repositioning fix for the latter, this would give unexpected results for end developers but I did fix the initial problem for this issue as seen in this screenshot:
Activity
tobrun commentedon Sep 25, 2015
Been looking at Raster-SDK there we are panning the map to make it fit.
@incanus How is iOS handling this?
tobrun commentedon Sep 25, 2015
Currently noticing that panning hides the InfoWindow, in Raster-SDK it doesn't.
should this be fixed or is this a works-as-designed feature?
ljbade commentedon Sep 25, 2015
Hmm I'm not sure why we hide on pan, it might have been a work around for the lag/jitter. @bleege @incanus know more about this
friedbunny commentedon Sep 27, 2015
The InfoWindow/callout view should move with the map and stay within the viewport while accounting for margins/etc. Eventually we'll implement this on iOS, but so far we haven't — instead we hide it on pan.
See #1089 and #1784.
tobrun commentedon Sep 28, 2015
Based on info given above, I wil add the same functionality as iOS.Will create a issue for this so we can close this one after the PR.
EDIT: while trying to get it to work I'm noticing lag which results in a bad ux, I will create another ticket for working on annotations in general. While working on that I will pick up this issue automatically
bleege commentedon Sep 28, 2015
Yep, @friedbunny is absolutely correct. Let's mirror what iOS is doing.
incanus commentedon Sep 28, 2015
To be clear, iOS is hiding the callout on any viewport change because we don't have a good system in the sub-project that we use for callouts (which are rather complex and MapKit-like) to reposition without re-displaying. So mirroring iOS behavior would not track the map.
I do think we should not track the map on Android until we solve the sync problems with the user dot as described elsewhere. then we can move the info window with the map, too, which is more complex and requires re-layout when hitting the map edge, etc.
6 remaining items
ljbade commentedon Oct 13, 2015
Captured a screenshot showing the bug when opening InfoWindow on Streets, then switching to Emerald:


ljbade commentedon Oct 13, 2015
Also noticed the touch hit box for Emerald is too small. @bleege is this an already known issue?
ljbade commentedon Oct 13, 2015
Bummer can't fix the marker size change bug until #2263 is fixed. So I will make new issue -> #2599
tobrun commentedon Oct 13, 2015
@ljbade: details are in #1504
ljbade commentedon Oct 13, 2015
@tobrun Excellent.
tobrun commentedon Oct 13, 2015
tobrun commentedon Oct 13, 2015
On Android we have 2 types of info windows:
I did not implement the margin/repositioning fix for the latter, this would give unexpected results for end developers but I did fix the initial problem for this issue as seen in this screenshot:
bleege commentedon Oct 13, 2015
@tobrun This looks great! The Default InfoWindow will be just fine for now. 👍
bleege commentedon Oct 13, 2015
@tobrun I tried testing things out in #2601 to merge, but ran into some issues. We're getting close though!
[android] #2273 - Added InfoWindowView, Refactored InfoWindow to take…
[android] mapbox#2273 - Added InfoWindowView, Refactored InfoWindow t…