You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our project requires dynamic cluster coloring based on specific conditions, such as the presence of particular markers (e.g., user markers) within the cluster. Currently, the only way to achieve this in react-native-map-clustering is to use the renderCluster function, which:
Requires overriding the entire cluster rendering logic.
Limits the flexibility of maintaining the library's default behavior for cluster appearance and behavior.
Current Workaround
The current approach involves using renderCluster to:
Retrieve each cluster’s child markers with superClusterRef.
Check if any child markers match specific conditions (like specific user markers).
Override the default cluster color based on the results of this check.
While this approach technically works, it is not efficient or ideal due to the above limitations.
Feature Request
We request the addition of a dynamic cluster color property that allows:
Clusters to be styled based on certain properties or conditions without redefining renderCluster.
Ability to pass a callback or configuration to adjust colors based on each cluster’s content, while preserving the default renderCluster behavior
This approach would:
Simplify the implementation by removing the need for renderCluster.
Allow for conditional styling while preserving the default functionality and performance of the library.
The text was updated successfully, but these errors were encountered:
Problem Statement
Our project requires dynamic cluster coloring based on specific conditions, such as the presence of particular markers (e.g., user markers) within the cluster. Currently, the only way to achieve this in react-native-map-clustering is to use the renderCluster function, which:
Current Workaround
The current approach involves using renderCluster to:
While this approach technically works, it is not efficient or ideal due to the above limitations.
Feature Request
We request the addition of a dynamic cluster color property that allows:
This approach would:
The text was updated successfully, but these errors were encountered: