-
Notifications
You must be signed in to change notification settings - Fork 11
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
Adding styles to an annotation #62
Comments
Hello, The annotations are rendered on the map by MapKit JS, which controls their ordering. You might be able to achieve what you’re looking for with the |
Hello. Yes, I tried to do that. I tried to set the initial display priority as undefiend, and then change it to required on hover, but it doesn't work. The only thing that helped me was when the props annotation selected is true, then it appears on top of the other annotations. But this approach also requires a lot of writing, because I use calloutElement and I need the selected state for it. |
@DaniilGiz Happy to see you using the calloutElements already quickly after they were introduced. However, please note that there are still some bugs related to those unfortunately, so that in some cases when annotations are too close to each other (like the example you described) it might be possible this actually crashes your app unfortunately. I am currently investigating into this however, unfortunately I haven't yet figured out the reason or how to fix it and it currently looks like some strange behavior within Mapkit itself. Update: Callout was fixed with #63 and should be working as expected |
I'm using your map to display multiple annotations on a map, and there may be a case where these annotations are close to each other. And I also use custom styles for annotation. When I hover over an annotation that is below another, I want to be able to add styles to the annotation, such as z-index, so that the annotation I hovered over is visible. This is currently not possible. I have an example from vio where they have custom annotations on the map, and I have a similar situation.
The text was updated successfully, but these errors were encountered: