Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Allowing multiple InfoWindows to be visible at a time #3115

Closed

Description

@zugaldia

At the moment, only one InfoWindow can be visible at a time. We want to be able to show multiple at once.

Activity

  1. added
    Android
    on Nov 24, 2015
  2. incanus commented on Nov 24, 2015

    @incanus
    Contributor

    To analog (verb?) the iOS side, the selectAnnotations: API there allows for multiple annotations to be passed to selection but, like Apple Maps, to only set selected state on the first one (see here).

    I think it's best on iOS to probably stick to that, but since on Android we have some needs for multiple popups, we can maybe use that API as a model, albeit with slightly different behavior.

  3. zugaldia commented on Nov 24, 2015

    @zugaldia
    MemberAuthor

    In that case, and to mimic selectedAnnotations, we could just move from a private Marker mSelectedMarker; to a private List<Marker> mSelectedMarkers = new ArrayList<>(); and change the internal MapView logic accordingly. API-wise, public Marker getSelectedMarker() will become public List<Marker> getSelectedMarkers().

    I'll try that approach in https://github.com/mapbox/mapbox-gl-native/tree/3115-multiple-infowindows

  4. added a commit that references this issue on Nov 25, 2015
  5. zugaldia commented on Nov 25, 2015

    @zugaldia
    MemberAuthor

    Good progress on both keeping the InfoWindow open and also allowing an InfoWindow to be open while panning.

    Before having a PR ready we need to do some small refactoring. As discussed, we don't see a performance hit for such a small number of InfoWindows.

  6. added a commit that references this issue on Nov 25, 2015
  7. assigned and unassigned on Nov 25, 2015
  8. bleege commented on Nov 29, 2015

    @bleege
    Contributor

    @zugaldia @tobrun FWIW, let's leave the "default" mode to be just 1 InfoWindow open at a time per MapView as this is likely to be the majority of desired use cases for developers. This means that we'll want to have a flag of some sort on the MapView to enable multiple visible InfoWindow support. Something like setAllowConcurrentMultipleOpenInfoWindows(boolean allow). I'm not currently seeing this in #3127. Thoughts?

  9. tobrun commented on Nov 30, 2015

    @tobrun
    Member

    @bleege seems logical, I consider having multiple open to be a special kind of requirement.
    @zugaldia can you take this up? currently not on the project.

  10. zugaldia commented on Nov 30, 2015

    @zugaldia
    MemberAuthor

    @bleege @tobrun I like it and it changes the API in a consistent way. I'll give it a pass today.

  11. zugaldia commented on Nov 30, 2015

    @zugaldia
    MemberAuthor

    Flag implemented in e9d749b.

    You can test it on TestApp's InfoWindowActivity and InfoWindowAdapterActivity commenting out the following line in onCreate:

    mMapView.setAllowConcurrentMultipleOpenInfoWindows(true);
    
  12. tobrun commented on Nov 30, 2015

    @tobrun
    Member
  13. incanus commented on Nov 30, 2015

    @incanus
    Contributor

    We'll need some thinking about the UI interactions here. For example, I'm guessing that when one or more info windows are up and you tap on a non-interactive part of the map, all are dismissed? We should probably keep it that way for simplicity.

  14. zugaldia commented on Nov 30, 2015

    @zugaldia
    MemberAuthor

    @incanus that's right, tapping on a non-interactive part of the map dismisses them all. It feels pretty natural right now, but we can definitely learn with usage.

  15. added this to the android-v2.3.0 milestone on Nov 30, 2015
  16. zugaldia commented on Dec 1, 2015

    @zugaldia
    MemberAuthor

    I'm reopening this issue. Although the basic functionality is there and performing well for a low number of InfoWindows, there're still a few related things that need to be addressed:

  17. Piusin commented on Jun 20, 2018

    @Piusin

    This didn't help me

  18. zugaldia commented on Jun 20, 2018

    @zugaldia
    MemberAuthor

    @Piusin thanks for the feedback. Could you open a new ticket explaining the issue that you're encountering? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Androidfeature

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions