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

[Bug] CollisionBehavior and conditional rendering for AdvancedMarker #449

Open
soszik opened this issue Jul 15, 2024 · 1 comment
Open
Labels
google maps issue Google Maps is misbehaving, upstream issue filed

Comments

@soszik
Copy link

soszik commented Jul 15, 2024

Description

Hi,
I noticed unexpected behavior for Advanced Markers with collision behavior OPTIONAL_AND_HIDES_LOWER_PRIORITY.
<AdvancedMarker key={id} position={{ lat: latValue, lng: lngValue }} zIndex={800} collisionBehavior={CollisionBehavior.OPTIONAL_AND_HIDES_LOWER_PRIORITY} >
In my particular case I render an array of markers for when zoom is within given level (showMarkers is set to true)
showMarkers && <Markers>
When markers are not visible and then zoom changes to certain level and they should be rendered, at first ALL Markers are visible and after short amount of time (less than 1 s) the overlapping markers are hidden.

Expected behavior: only not-overlapping markers should be visible from the beginning.

Steps to Reproduce

Render array of Advanced Marker with CollisionBehavior.OPTIONAL_AND_HIDES_LOWER_PRIORITY with optional rendering based on Boolean flag.
When they rendered after flag is set to true ALL markers are visible for max 1s, then overlapping markers disappear.

Environment

  • Library version: 1.1.0
  • Google maps version: weekly
  • Browser and Version: Chrome 126.0.6478.127 (Official Build) (64-bit)
  • OS: Windows 10

Logs

No response

@soszik soszik added the bug Something isn't working label Jul 15, 2024
@usefulthink
Copy link
Collaborator

Unfortunately, this is an issue in the maps API, I filed an issue here: https://issuetracker.google.com/issues/356896467

@usefulthink usefulthink added google maps issue Google Maps is misbehaving, upstream issue filed and removed bug Something isn't working labels Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
google maps issue Google Maps is misbehaving, upstream issue filed
Projects
None yet
Development

No branches or pull requests

2 participants