小编Kam*_*yev的帖子

如何对除一个之外的所有标记进行聚类

我正在使用react-native-map-clustering对谷歌地图上的标记进行聚类。除指示我的位置的一个标记外,所有标记都是动态的。当我缩小地图时,所有标记都会聚集在一起。但我想要这样的东西 在此输入图像描述 这是我的实现:

<MapView
            layoutAnimationConf={LayoutAnimation.Presets.easeInEaseOut}
            animationEnabled={true}
            ref={mapRef}
            style={styles.map}
            provider={PROVIDER_GOOGLE}
            initialRegion={currentRegion}
            // region={currentRegion}
            clusteringEnabled={true}
            radius={70}
            customMapStyle={mapConfig}>
            <Marker coordinate={currentRegion} title={'my location'}>
                <Image
                    source={images.currentLocation}
                    style={{
                        height: 20,
                        width: 20,
                    }}
                />
            </Marker>
            {branchMarkers()}
        </MapView>
Run Code Online (Sandbox Code Playgroud)

react-native react-native-map-clustering

1
推荐指数
1
解决办法
1675
查看次数