Skip to content

Commit 7fc53c9

Browse files
chetantomekvenits
authored andcommitted
removed unwanted code
1 parent cca206b commit 7fc53c9

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lib/ClusteredMapView.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ const ClusteredMapView = ({
3434
const [otherChildren, updateChildren] = useState([]);
3535
const [superCluster, setSuperCluster] = useState(null);
3636
const [currentRegion, updateRegion] = useState(
37-
restProps.region || restProps.initialRegion,
37+
restProps.region || restProps.initialRegion
3838
);
3939
const [isSpiderfier, updateSpiderfier] = useState(false);
4040
const [spiderfierMarker, updateSpiderfierMarker] = useState(null);
4141
const [clusterChildren, updateClusterChildren] = useState(null);
4242
const mapRef = createRef();
4343

4444
const propsChildren = useMemo(() => React.Children.toArray(children), [
45-
children,
45+
children
4646
]);
4747

4848
useEffect(() => {
@@ -67,7 +67,7 @@ const ClusteredMapView = ({
6767
maxZoom,
6868
minZoom,
6969
extent,
70-
nodeSize,
70+
nodeSize
7171
});
7272

7373
superCluster.load(rawData);
@@ -126,7 +126,7 @@ const ClusteredMapView = ({
126126
const zoom = returnMapZoom(region, bBox, minZoom);
127127
const markers = superCluster.getClusters(bBox, zoom);
128128

129-
if (animationEnabled && Platform.OS === 'ios') {
129+
if (animationEnabled && Platform.OS === "ios") {
130130
LayoutAnimation.configureNext(layoutAnimationConf);
131131
}
132132
if (zoom >= 17 && markers.length === 1) {
@@ -149,13 +149,13 @@ const ClusteredMapView = ({
149149
return;
150150
}
151151

152-
const coordinates = children.map(({geometry}) => ({
152+
const coordinates = children.map(({ geometry }) => ({
153153
latitude: geometry.coordinates[1],
154-
longitude: geometry.coordinates[0],
154+
longitude: geometry.coordinates[0]
155155
}));
156156

157157
mapRef.current.fitToCoordinates(coordinates, {
158-
edgePadding: restProps.edgePadding,
158+
edgePadding: restProps.edgePadding
159159
});
160160

161161
onClusterPress(cluster, children);
@@ -177,7 +177,7 @@ const ClusteredMapView = ({
177177
onPress: _onClusterPress(marker),
178178
clusterColor,
179179
clusterTextColor,
180-
...marker,
180+
...marker
181181
})
182182
) : !isSpiderfier ? (
183183
<ClusterMarker
@@ -217,21 +217,21 @@ ClusteredMapView.defaultProps = {
217217
preserveClusterPressBehavior: false,
218218
layoutAnimationConf: LayoutAnimation.Presets.spring,
219219
// SuperCluster parameters
220-
radius: Dimensions.get('window').width * 0.06,
220+
radius: Dimensions.get("window").width * 0.06,
221221
maxZoom: 20,
222222
minZoom: 1,
223223
extent: 512,
224224
nodeSize: 64,
225225
// Map parameters
226-
edgePadding: {top: 50, left: 50, right: 50, bottom: 50},
226+
edgePadding: { top: 50, left: 50, right: 50, bottom: 50 },
227227
// Cluster styles
228228
clusterColor: '#00B386',
229229
clusterTextColor: '#FFFFFF',
230230
spiderLineColor: '#FF0000',
231231
// Callbacks
232232
onRegionChangeComplete: () => {},
233233
onClusterPress: () => {},
234-
mapRef: () => {},
234+
mapRef: () => {}
235235
};
236236

237237
export default memo(ClusteredMapView);

0 commit comments

Comments
 (0)