Skip to content

Should the Cluster Map component automatically fit the marker contents? #282

@lucksp

Description

@lucksp

I am finding I have to create a useEffect to render the map so it fits the markers. But with this library, I would have expected the map to automatically handle this.

useEffect(
    function fitMarkers() {
      if (dataCoords?.length) {
        mapRef.current?.fitToCoordinates(dataCoords);
      }
    },
    [dataCoords, insets.top, currentSnapIndex, insets.bottom]
  );

Likely the package would have an effect like this behind the scene, but I just want to double check what the expectations are around this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions