Closed amitchandra-logiciel closed 11 months ago
Hi, I want to highlight cluster when any selected is true in cluster group. but seem like cluster properties not created.
Future<void> addSource(data) async { for (var feature in data?['features'] ?? []) { feature['properties']['amount_label'] = Helper.getCurreny( feature['properties']['max_price'], useCompact: true, ); feature['properties']['selected'] = true; } propertiesInMap = data; if (propertiesInMap?.containsKey('features') ?? false) { await mapController?.addSource( 'properties', GeojsonSourceProperties( cluster: true, data: propertiesInMap, clusterProperties: { 'has_selected': [ Expressions.any, [Expressions.equal, [Expressions.get, "selected"], true], ], // 'has_selected': [Expressions.has, 'point_count'] }, ), ); await addLayer(); } }
Future<void> addLayer() async { await mapController?.addCircleLayer( 'properties', 'cluster-point', const CircleLayerProperties( circleRadius: 12, circleColor: [ Expressions.caseExpression, [Expressions.equal, [Expressions.get, 'has_selected'], true], "#006AF9", "#DC00FE", ], ), filter: [Expressions.has, 'point_count'], ); }
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi, I want to highlight cluster when any selected is true in cluster group. but seem like cluster properties not created.