PolygonSearchEntityOption.fromMap constructor

PolygonSearchEntityOption.fromMap(
  1. Map map
)

Implementation

PolygonSearchEntityOption.fromMap(Map map)
    : assert(map != null),
      super.fromMap(map) {
  if (map['vertexes'] != null) {
    vertexes = <LatLng>[];
    map['vertexes'].forEach((e) {
      vertexes.add(LatLng.fromMap(e as Map));
    });
  }
  if (map['coordTypeInput'] != null) {
    int value = map['coordTypeInput'] as int;
    if (value >= 0 && value <= 2) {
      coordTypeInput = CoordType.values[value];
    }
  }
}