Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotation selection #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BucekJiri
Copy link

@BucekJiri BucekJiri commented Aug 4, 2022

Annotation selection

  • ViewMapAnnotation extended for selectedContent = content to display when the annotation is selected
  • Map initializers extended for selectedItem binding - allows to observe the selected item and set it from code (apart from the user tap manual selection)

@rmnblm
Copy link

rmnblm commented Nov 3, 2022

Hi @BucekJiri

Thank you for you contributions to this repository. I've found your additions very helpful, especially the clustered content.
However, having another size for the selected content leads to this behavior:

Simulator.Screen.Recording.-.iPhone.-.2022-11-03.at.18.31.34.mp4

The selected content does not seem to be centered like the unselected content. Did you notice this too? Any idea how to fix this? I could not find a way so far.

By the way: Any idea how to animate the change between unselected to selected?

Thank you very much!
-Roman

@BucekJiri
Copy link
Author

Hey @rmnblm

great to hear you found it helpful. This PR is a bit outdated and does not contain all the recent changes.

Check this issue. It might help you with the problem.

When it comes to animating the selection, I have not tried that but I believe triggering an animation in the overridden setSelected method in the MKMapAnnotationView could do the trick.

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.

2 participants