add marker property isAlwaysSelected on iOS#3134
Merged
rborn merged 3 commits intoreact-native-maps:masterfrom Oct 23, 2019
Merged
add marker property isAlwaysSelected on iOS#3134rborn merged 3 commits intoreact-native-maps:masterfrom
rborn merged 3 commits intoreact-native-maps:masterfrom
Conversation
Collaborator
|
@brien-crean 😻 could you please amend the docs too ? Few questions:
|
Contributor
Author
|
@rborn thanks for the feedback! I just updated the docs and the name to isPreselected 😄 onSelect fires as normal when a marker is tapped for the first time when this is enabled. The only drawback I see is that if you needed to programmatically check whether a marker was selected or not this would always return true. I have been using this for a while on my fork and I really like it. I can immediately drag a marker without having to focus it first. It's particularly useful when a number of markers are the points of a polygon. I can easily drag markers to reshape the polygon. |
pinpong
pushed a commit
to pinpong/react-native-maps
that referenced
this pull request
Feb 28, 2025
* add marker property isAlwaysSelected on iOS * updated naming of feature to isPreselected to better reflect functionality * updated Marker component docs for isPreselected prop
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Does any other open PR do the same thing?
I couldn't find any PRs that add an always selected option on a marker (iOS).
What issue is this PR fixing?
It adds a property to the
<Marker />component calledisAlwaysSelectedwhich when set to true, allows a user to drag a marker immediately without having to first select it - similar to Android behaviour. This feature is useful when you want the ability to quickly drag markers rather than tap and then drag.How did you test this PR?
Affects iOS only.
Tested on the latest version of react native - 0.61.2 on simulator and real device