Repository navigation
Closed
Labels
Description
I manage getting clustering to work but the clusterMaxZoom and clusterMinPoints attributes do not seem to function at all. I tried with pre v10, v10 and maplibre versions.
Here is the react-native code for v10
<MapboxGL.MapView
ref={(c) => (this._map = c)} style={sheet.matchParent}
zoomEnabled={true}
styleURL={(darkMode ? VECTOR_SOURCE_URL_DARK : VECTOR_SOURCE_URL_LIGHT)}
onRegionDidChange={(e)=>{this.updateCenter()}}
logoEnabled={false}
rotateEnabled={false}
pitchEnabled={false} >
<MapboxGL.UserLocation visible={true} onUpdate={this.onUserLocationUpdate} />
<MapboxGL.Camera
zoomLevel={this.zoomLevel}
minZoomLevel={8}
maxZoomLevel={18}
centerCoordinate={this.allData.region[0]}
animationMode={'none'}
/>
<MapboxGL.ShapeSource
id="businesses"
shape={this.allData.dataBusinesses}
tolerance={5}
clusterRadius={30}
clusterMinPoints={4}
clusterMaxZoom={1}
cluster={true}
>
<MapboxGL.SymbolLayer id="ico" style={this.styles.icon} />
<MapboxGL.SymbolLayer id="pointCount" style={this.styles.clusterCount} />
<MapboxGL.CircleLayer
id="clusteredPoints"
belowLayerID="pointCount"
filter={['has', 'point_count']}
style={this.styles.clusteredPoints} />
</MapboxGL.ShapeSource>
</MapboxGL.MapView>
My build.gradle
buildscript {
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 29
compileSdkVersion = 31
targetSdkVersion = 31
googlePlayServicesAuthVersion = "16.0.1"
androidMapsUtilsVersion = "0.5+"
supportLibVersion = "30.0.0"
RNMapboxMapsImpl = "mapbox"
RNMapboxMapsLibs = { // optional - only required if you want to customize it
implementation 'com.mapbox.maps:android:10.5.0'
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:5.4.1'
}
}
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:7.1.1")
classpath 'com.google.gms:google-services:4.1.0'
}
}
Are these attribute and associated functionalities actually implemented and working?
Thanks in advance!
Activity
mfazekas commentedon Jun 7, 2022
We have
clusterMaxZoomLevelbut noclusterMinPointsmfazekas commentedon Sep 30, 2022
clusterMinPointsseems to be not supported on nativemaplibre/maplibre-native#261