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

Add setOnInfoWindowClickListener() #2448

Closed
tobrun opened this issue Sep 29, 2015 · 6 comments · Fixed by #2637
Closed

Add setOnInfoWindowClickListener() #2448

tobrun opened this issue Sep 29, 2015 · 6 comments · Fixed by #2637
Assignees
Labels
Android Mapbox Maps SDK for Android

Comments

@tobrun
Copy link
Member

tobrun commented Sep 29, 2015

Needed for parity with Google Maps, they expose a method setOnInfoWindowClickListener on MapView, Our current implementation uses a method directly on Marker:

  marker.setInfoWindowOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View view, MotionEvent motionEvent) {
                Toast.makeText(getApplicationContext(), "Custom Info Touch Listener!!", Toast.LENGTH_SHORT).show();
                marker.hideInfoWindow();
                return true;
            }
        });
@tobrun tobrun added the Android Mapbox Maps SDK for Android label Sep 29, 2015
@bleege bleege modified the milestones: android-v0.2.0, android-v0.1.1, android-v2.0.0, android-v2.1.0 Sep 29, 2015
@bleege bleege self-assigned this Oct 10, 2015
@bleege bleege changed the title Add OnInfoWindowClickListener Add OnInfoWindowTouchListener Oct 10, 2015
@bleege
Copy link
Contributor

bleege commented Oct 10, 2015

@tobrun I don't see the method setOnInfoWindowClickListener() in the Google Map MapView API. I do see it on the GoogleMap class however. Since the Mapbox SDK doesn't currently have a corresponding "MapboxMap" object but instead relies on direct access to MapView I don't think we need to implement this now.

Let's close this for now and re-open it in the future if / when the "MapboxMap" concept is built. As part of that I'm going to move the first commit I made on a dev branch (regarding moving InfoWindow classes to annotations package) to a different ticket.

@bleege bleege closed this as completed Oct 10, 2015
@bleege bleege changed the title Add OnInfoWindowTouchListener Add setOnInfoWindowClickListener() Oct 10, 2015
@ljbade
Copy link
Contributor

ljbade commented Oct 12, 2015

@bleege The Google MapView/MapFragment are very thin shim classes that expose all their functionality in GoogleMaps. I don't see why we would need a MaboxMap class first since we expose everything directly via MapView. Perhaps we can just leave this for 2.2.0? (since the functionality already exists but could be made easier to use)

@ljbade ljbade modified the milestones: android-v2.2.0, android-v2.1.0 Oct 12, 2015
@ljbade ljbade reopened this Oct 12, 2015
@bleege
Copy link
Contributor

bleege commented Oct 12, 2015

@ljbade Technically yes, but if our goal is to mirror the Google Maps API how does this help?

@ljbade
Copy link
Contributor

ljbade commented Oct 12, 2015

@ljbade well we can add all theese to MapView, then in 3.0.0 or whatever we call it after the refactor, everything that is in MapView currently (at least all the public methods), will be moved to MapboxMap. And MapView will have a single method getMapAsync()

@ljbade ljbade modified the milestones: android-v2.1.0, android-v2.2.0 Oct 16, 2015
@ljbade
Copy link
Contributor

ljbade commented Oct 16, 2015

Hitting this in #2546

ljbade pushed a commit that referenced this issue Oct 16, 2015
Remove unimplemented properties.
Make annotations immutable.
Correct defintions of equals() and hasCode().
Change anchor U/V to int.
Move .alpha to MultiPoint and anchor() to PolylineOptions and PolygonOptions.
Make InfoWindow classes package private.
Add setOnInfoWindowClickListener and remove old method from Marker.
JavaDoc internal methods with "Do not use."
Refactor showInfoWindow() to remove need for exposing internal method.
Make select/deselectMarker public. Add getSelectedMarker.
Fix bug where you couldn't reselect a closed info window.
Fixes #2546
Fixes #2631
Fixes #2448
@ljbade ljbade assigned ljbade and unassigned bleege Oct 16, 2015
@bleege
Copy link
Contributor

bleege commented Oct 16, 2015

This is being moved to android-v2.2.0 per #2546 (comment)

@bleege bleege modified the milestones: android-v2.2.0, android-v2.1.0 Oct 16, 2015
ljbade pushed a commit that referenced this issue Oct 22, 2015
Remove unimplemented properties.
Correct defintions of equals() and hasCode().
Add setOnInfoWindowClickListener and remove old method from Marker.
Refactor showInfoWindow() to remove need for exposing internal method.
Make select/deselectMarker public. Add getSelectedMarker.
Fix bug where you couldn't reselect a closed info window.
Add empty constructor to LatLng and LatLngZoom.
Fixes #2546
Fixes #2631
Fixes #2448
AndwareSsj pushed a commit to AndwareSsj/mapbox-gl-native that referenced this issue Nov 6, 2015
Remove unimplemented properties.
Correct defintions of equals() and hasCode().
Add setOnInfoWindowClickListener and remove old method from Marker.
Refactor showInfoWindow() to remove need for exposing internal method.
Make select/deselectMarker public. Add getSelectedMarker.
Fix bug where you couldn't reselect a closed info window.
Add empty constructor to LatLng and LatLngZoom.
Fixes mapbox#2546
Fixes mapbox#2631
Fixes mapbox#2448
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants