Custom text/ Aggregated Value in cluster circle
pradhan91 opened this issue · 2 comments
I am following this sample for implementing cluster. I was able to get the clusters but I cannot customize the values showing in the symbol layer. I want to show an aggregated value or some custom text in the cluster instead of the count.
val count = toString(get(POINT_COUNT))
style.addLayer(
SymbolLayer("count", EARTHQUAKE_SOURCE_ID).withProperties(
textField(count),
textSize(14f),
textColor(Color.WHITE),
textIgnorePlacement(true),
// The .5f offset moves the data numbers down a little bit so that they're in the middle of the triangle cluster image
// textOffset(arrayOf(0f, .5f)),
textAllowOverlap(true)
)
)
Hi @pradhan91 , thanks for using Mapbox. Please reach out to our great Support team via https://support.mapbox.com/hc/en-us/requests/new?ticket_form_id=360000291231 if you have Mapbox implementation questions. Tickets in this repo are specific to the demo app.
For anyone in the future looking having some of the similar questions this link has a place to start with:
https://github.com/mapbox/mapbox-gl-native-android/blob/master/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/GeoJsonClusteringActivity.java#L92-L107
I reached out to the support team in the mean time. Will update here if I hear back from them.