search method

Future<void> search(
  1. String? data, {
  2. required GeoJsonQuery query,
  3. String? nameProperty,
  4. bool verbose = false,
  5. bool disableStream = false,
})

Search a GeoJsonFeature by property.

If the string data is not provided the existing features will be used to search

Implementation

Future<void> search(String? data,
    {required GeoJsonQuery query,
    String? nameProperty,
    bool verbose = false,
    bool disableStream = false}) async {
  if (data == null && features.isEmpty) {
    throw ArgumentError("Provide data or parse some to run a search");
  }
  if (data != null) {
    await _parse(data,
        nameProperty: nameProperty,
        verbose: verbose,
        query: query,
        disableStream: disableStream);
  }
}