querySourceFeatures method
Implementation
@override
Future<List> querySourceFeatures(
String sourceId, String? sourceLayerId, List<Object>? filter) async {
final parameters = <String, dynamic>{};
if (sourceLayerId != null) {
parameters['sourceLayer'] = sourceLayerId;
}
if (filter != null) {
parameters['filter'] = filter;
}
print(parameters);
return _map
.querySourceFeatures(sourceId, parameters)
.map((feature) => {
'type': 'Feature',
'id': feature.id,
'geometry': {
'type': feature.geometry.type,
'coordinates': feature.geometry.coordinates,
},
'properties': feature.properties,
'source': feature.source,
})
.toList();
}