any static method

BasicFeatureSource<FeatureItem, FeatureItems> any(
  1. Future<String> source(), {
  2. TextReaderFormat<FeatureContent> format = GeoJSON.feature,
  3. CoordRefSys? crs,
})

A client for accessing a GeoJSON feature collection from any source;

The source function returns a future that fetches data from a file, a web resource or other sources. Contents must be GeoJSON compliant data.

When format is not given, then GeoJSON with default settings is used as a default. Note that currently only GeoJSON is supported, but it's possible to inject another format implementation (or with custom configuration) to the default one.

Use crs to give hints (like axis order, and whether x and y must be swapped when read in) about coordinate reference system in text input.

Implementation

static BasicFeatureSource any(
  Future<String> Function() source, {
  TextReaderFormat<FeatureContent> format = GeoJSON.feature,
  CoordRefSys? crs,
}) =>
    _GeoJSONFeatureSource(
      source,
      format: format,
      crs: crs,
    );