@@ -34,15 +34,15 @@ const ClusteredMapView = ({
34
34
const [ otherChildren , updateChildren ] = useState ( [ ] ) ;
35
35
const [ superCluster , setSuperCluster ] = useState ( null ) ;
36
36
const [ currentRegion , updateRegion ] = useState (
37
- restProps . region || restProps . initialRegion ,
37
+ restProps . region || restProps . initialRegion
38
38
) ;
39
39
const [ isSpiderfier , updateSpiderfier ] = useState ( false ) ;
40
40
const [ spiderfierMarker , updateSpiderfierMarker ] = useState ( null ) ;
41
41
const [ clusterChildren , updateClusterChildren ] = useState ( null ) ;
42
42
const mapRef = createRef ( ) ;
43
43
44
44
const propsChildren = useMemo ( ( ) => React . Children . toArray ( children ) , [
45
- children ,
45
+ children
46
46
] ) ;
47
47
48
48
useEffect ( ( ) => {
@@ -67,7 +67,7 @@ const ClusteredMapView = ({
67
67
maxZoom,
68
68
minZoom,
69
69
extent,
70
- nodeSize,
70
+ nodeSize
71
71
} ) ;
72
72
73
73
superCluster . load ( rawData ) ;
@@ -126,7 +126,7 @@ const ClusteredMapView = ({
126
126
const zoom = returnMapZoom ( region , bBox , minZoom ) ;
127
127
const markers = superCluster . getClusters ( bBox , zoom ) ;
128
128
129
- if ( animationEnabled && Platform . OS === ' ios' ) {
129
+ if ( animationEnabled && Platform . OS === " ios" ) {
130
130
LayoutAnimation . configureNext ( layoutAnimationConf ) ;
131
131
}
132
132
if ( zoom >= 17 && markers . length === 1 ) {
@@ -149,13 +149,13 @@ const ClusteredMapView = ({
149
149
return ;
150
150
}
151
151
152
- const coordinates = children . map ( ( { geometry} ) => ( {
152
+ const coordinates = children . map ( ( { geometry } ) => ( {
153
153
latitude : geometry . coordinates [ 1 ] ,
154
- longitude : geometry . coordinates [ 0 ] ,
154
+ longitude : geometry . coordinates [ 0 ]
155
155
} ) ) ;
156
156
157
157
mapRef . current . fitToCoordinates ( coordinates , {
158
- edgePadding : restProps . edgePadding ,
158
+ edgePadding : restProps . edgePadding
159
159
} ) ;
160
160
161
161
onClusterPress ( cluster , children ) ;
@@ -177,7 +177,7 @@ const ClusteredMapView = ({
177
177
onPress : _onClusterPress ( marker ) ,
178
178
clusterColor,
179
179
clusterTextColor,
180
- ...marker ,
180
+ ...marker
181
181
} )
182
182
) : ! isSpiderfier ? (
183
183
< ClusterMarker
@@ -217,21 +217,21 @@ ClusteredMapView.defaultProps = {
217
217
preserveClusterPressBehavior : false ,
218
218
layoutAnimationConf : LayoutAnimation . Presets . spring ,
219
219
// SuperCluster parameters
220
- radius : Dimensions . get ( ' window' ) . width * 0.06 ,
220
+ radius : Dimensions . get ( " window" ) . width * 0.06 ,
221
221
maxZoom : 20 ,
222
222
minZoom : 1 ,
223
223
extent : 512 ,
224
224
nodeSize : 64 ,
225
225
// Map parameters
226
- edgePadding : { top : 50 , left : 50 , right : 50 , bottom : 50 } ,
226
+ edgePadding : { top : 50 , left : 50 , right : 50 , bottom : 50 } ,
227
227
// Cluster styles
228
228
clusterColor : '#00B386' ,
229
229
clusterTextColor : '#FFFFFF' ,
230
230
spiderLineColor : '#FF0000' ,
231
231
// Callbacks
232
232
onRegionChangeComplete : ( ) => { } ,
233
233
onClusterPress : ( ) => { } ,
234
- mapRef : ( ) => { } ,
234
+ mapRef : ( ) => { }
235
235
} ;
236
236
237
237
export default memo ( ClusteredMapView ) ;
0 commit comments