feature abstract method

void feature({
  1. Object? id,
  2. WriteGeometries? geometry,
  3. Map<String, dynamic>? properties,
  4. Box? bounds,
  5. Map<String, dynamic>? custom,
})

Writes a feature with id, geometry and properties.

The id, when non-null, should be either a string or an integer number.

At least one geometry using geometry should be written using methods defined by GeometryContent. When there are more than one geometry, it's recommended to use the name argument when writing those other.

An optional bounds can used set a minimum bounding box for a geometry written. A writer implementation may use it or ignore it.

Use custom to write any custom or "foreign member" properties along with those set by properties.

An example:

  content.feature(
      id: '1',
      geometry: (geom) => geom.point([10.123, 20.25].xy),
      properties: {
         'foo': 100,
         'bar': 'this is property value',
         'baz': true,
      },
  );

Implementation

void feature({
  Object? id,
  WriteGeometries? geometry,
  Map<String, dynamic>? properties,
  Box? bounds,
  Map<String, dynamic>? custom,
});