novalabio/react-native-maps-super-cluster

Is this module compatible with react native .60 and above

Closed this issue · 1 comments

Markers and Clusters do not render

<ClusteredMapView provider={PROVIDER_GOOGLE} style={Style.map} customMapStyle={mapStyle} data={murals.data} clusteringEnabled = {true} ref={(r) => { this.map = r }} renderMarker={this.renderTestMarker} renderCluster={this.renderCluster} initialCamera={{ // center: { // latitude: this.props.murals.coords.lat, // longitude: this.props.murals.coords.lon, // }, pitch: 0, heading: 0, altitude: 1000, zoom: 13, }} initialRegion={{ latitude: murals.coords.lat, longitude: murals.coords.lon, latitudeDelta: 0.0922, longitudeDelta: 0.0421 }} />

data is flowing through super cluster however rendering never happens.
Here are the props passing though this module.

{provider: "google", style: {…}, customMapStyle: Array(26), data: Array(20), clusteringEnabled: true, …} accessor: "location" animateClusters: true clusterPressMaxChildren: 100 clusteringEnabled: true customMapStyle: (26) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}] data: (20) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}] edgePadding: {top: 10, left: 10, right: 10, bottom: 10} extent: 512 height: 812 initialCamera: {} initialRegion: {} layoutAnimationConf: {duration: 700, create: {…}, update: {…}, delete: {…}} maxZoom: 16 minZoom: 1 preserveClusterPressBehavior: true provider: "google" renderCluster: ƒ renderCluster(cluster, onPress) renderMarker: ƒ renderTestMarker(data) style: {flex: 1, height: "100%", zIndex: 1, marginTop: 35} width: 375 ref: (...) get ref: ƒ warnAboutAccessingRef()

Never mind, got it running, getCoordinatesFromItem in utils is expecting a key => location 'accessor', why not allow us to pass in lat and lon as individual key : vals or a contained object.