intepretFillOptions static method

Feature intepretFillOptions(
  1. FillOptions options,
  2. Feature feature
)

Implementation

static Feature intepretFillOptions(FillOptions options, Feature feature) {
  final properties = feature.properties;
  var geometry = feature.geometry;
  if (options.draggable != null) {
    properties['draggable'] = options.draggable;
  }
  if (options.fillColor != null) {
    properties['fillColor'] = options.fillColor;
  }
  if (options.fillOpacity != null) {
    properties['fillOpacity'] = options.fillOpacity;
  }
  if (options.fillOutlineColor != null) {
    properties['fillOutlineColor'] = options.fillOutlineColor;
  }
  if (options.fillPattern != null) {
    properties['fillPattern'] = options.fillPattern;
  }

  if (options.geometry != null) {
    geometry = Geometry(
      type: geometry.type,
      coordinates: fillGeometryToFeatureGeometry(options.geometry!),
    );
  }
  return feature.copyWith(properties: properties, geometry: geometry);
}