FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Allow you to handle your marker click event by florencepham · Pull Request #136 · airbnb/AirMapView · GitHub

Allow you to handle your marker click event - #136

Merged
nwadams merged 5 commits into
airbnb:masterfrom
florencepham:nga--handle-map-marker-clickk
Jul 18, 2019
Merged

Allow you to handle your marker click event#136
nwadams merged 5 commits into
airbnb:masterfrom
florencepham:nga--handle-map-marker-clickk

Conversation

florencepham commented Jul 17, 2019
edited
Loading

Copy link
Copy Markdown

This PR allows adds an option for users to handle onMarkerClick() event, so that the default behavior should not occur. The default behavior is for the camera to move to the marker once it's clicked. (https://developers.google.com/android/reference/com/google/android/gms/maps/GoogleMap.OnMarkerClickListener). This is a breaking change because it requires people who uses this library to implement onMarkerClickEventIsHandled()

I'm making a change for Explore Map to disable the behavior where the map centers on a marker once it's clicked. This is how this change looks on the demo map. Note that the map doesn't center on the markers when I click them.

ngsilverman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

If you follow my suggestion then I think this change makes sense, even if it is breaking. Make sure to add documentation to the interface you're modifying though.

listener.onMapMarkerClick(airMarker);
}
return false;
return listener.onMakerClickEventIsHandled();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why not add a return value to onMapMarkerClick instead? Seems more idiomatic.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I pushed a change that addressed this comment

nwadams merged commit e22c1aa into airbnb:master Jul 18, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL