Skip to content

onClusterPress function not working on Android and expo #241

@sammy532

Description

@sammy532

I have installed the library and imported it as suggested in the Read.me file. I am using expo for my project and testing on Android.

When I press on a cluster, I want to console.log the info about the cluster:

import MapView from "react-native-map-clustering";

....
<MapView
        style={styles.map}
        initialRegion={initialRegion}
        onClusterPress={(cluster, markers) => {
          console.log("cluster was pressed: ", cluster);
        }}
        clusterColor={"pink"}
        ref={mapRef}
      >
   ...

However, when I press the cluster, nothing happens. Can someone please, explain why?

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