Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit ab798a6

Browse files
author
Langston Smith
authored
Fixed black x icons showing in circle clustering example (#1257)
1 parent 4418600 commit ab798a6

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/dds/CircleLayerClusteringActivity.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,6 @@ private void addClusteredGeoJsonSource(@NonNull Style loadedMapStyle) {
162162
Timber.e("Check the URL %s", uriSyntaxException.getMessage());
163163
}
164164

165-
166-
// Use the earthquakes GeoJSON source to create three layers: One layer for each cluster category.
167-
// Each point range gets a different fill color.
168-
int[][] layers = new int[][] {
169-
new int[] {150, ContextCompat.getColor(this, R.color.mapboxRed)},
170-
new int[] {20, ContextCompat.getColor(this, R.color.mapboxGreen)},
171-
new int[] {0, ContextCompat.getColor(this, R.color.mapbox_blue)}
172-
};
173-
174165
//Creating a marker layer for single data points
175166
SymbolLayer unclustered = new SymbolLayer("unclustered-points", "earthquakes");
176167

@@ -189,8 +180,17 @@ private void addClusteredGeoJsonSource(@NonNull Style loadedMapStyle) {
189180
)
190181
)
191182
);
183+
unclustered.setFilter(has("mag"));
192184
loadedMapStyle.addLayer(unclustered);
193185

186+
// Use the earthquakes GeoJSON source to create three layers: One layer for each cluster category.
187+
// Each point range gets a different fill color.
188+
int[][] layers = new int[][] {
189+
new int[] {150, ContextCompat.getColor(this, R.color.mapboxRed)},
190+
new int[] {20, ContextCompat.getColor(this, R.color.mapboxGreen)},
191+
new int[] {0, ContextCompat.getColor(this, R.color.mapbox_blue)}
192+
};
193+
194194
for (int i = 0; i < layers.length; i++) {
195195
//Add clusters' circles
196196
CircleLayer circles = new CircleLayer("cluster-" + i, "earthquakes");

0 commit comments

Comments
 (0)