This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Support Custom InfoWindow Tap Handling #2283
Comments
After looking at this a bit further, as attractive as having the following be possible via // Ideal World
mMapView.addMarker(new MarkerOptions()
.position(backLot)
.title("Some Location")
.snippet("Some Snippet Text")
.infoWindowOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
// No access to Marker.hideInfoWindow() or InfoWindow.close()
}
return true;
}
})); // Real World
final Marker marker = mMapView.addMarker(new MarkerOptions()
.position(backLot)
.title("Some Location")
.snippet("Some Snippet Text"));
marker.setInfoWindowOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
// Do Custom Stuff
// Hide It
marker.hideInfoWindow();
return true;
}
}); |
bleege
added a commit
that referenced
this issue
Sep 8, 2015
…foWindowOnTouchListener(). Added Test to Custom Annotations in TestApp's MainActivity.
Merged! |
bleege
added a commit
that referenced
this issue
Sep 11, 2015
…foWindowOnTouchListener(). Added Test to Custom Annotations in TestApp's MainActivity.
AndwareSsj
pushed a commit
to AndwareSsj/mapbox-gl-native
that referenced
this issue
Nov 6, 2015
….setInfoWindowOnTouchListener(). Added Test to Custom Annotations in TestApp's MainActivity.
AndwareSsj
pushed a commit
to AndwareSsj/mapbox-gl-native
that referenced
this issue
Nov 6, 2015
….setInfoWindowOnTouchListener(). Added Test to Custom Annotations in TestApp's MainActivity.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The original implementation of Popups didn't bring the ability to custom respond to InfoWindow taps. Let's add this by creating a method in
MarkerOptions
that allows a CustomView.OnTouchListener
to be set using viaInfoWindow.setOnTouchListener()
.The text was updated successfully, but these errors were encountered: