Skip to content

Marker pop-ups close when page re-renders #225

@neilenns

Description

@neilenns

I've added MarkerClusterGroup to my map to help with some performance issues, but it's causing marker popups to close immediately after open. When I open a popup I'm updating a view count in a database behind the scenes, which causes a page re-render.

This isn't an issue if I remove MarkerClusterGroup.

I believe this is similar/same as two issues that were automatically marked as stale and closed: #181 and #167.

Here's an example of the code I'm using:

    <MarkerClusterGroup>
      {locations.map((location) => (
        <LocationMarker key={location.id} location={location} />
      ))}
    </MarkerClusterGroup>

I assume the key property isn't getting set on the marker when I use MarkerClusterGroup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions