BMFPolyline.fromMap constructor
- Map map
map => BMFPolyline
Implementation
BMFPolyline.fromMap(Map map)
: assert(map['coordinates'] != null),
assert(map['indexs'] != null),
super.fromMap(map) {
if (map['coordinates'] != null) {
coordinates = new List<BMFCoordinate>();
map['coordinates'].forEach((v) {
coordinates.add(BMFCoordinate.fromMap(v as Map));
});
}
if (map['indexs'] != null) {
indexs = new List<int>();
map['indexs'].forEach((v) {
indexs.add(v as int);
});
}
if (map['colors'] != null) {
colors = new List<Color>();
map['colors'].forEach((v) {
colors.add(ColorUtil.hexToColor(v as String));
});
}
if (map['textures'] != null) {
textures = new List<String>();
map['textures'].forEach((v) {
textures.add(v as String);
});
}
width = map['width'] as int;
dottedLine = map['dottedLine'] as bool;
lineDashType = BMFLineDashType.values[map['lineDashType'] as int];
lineCapType = BMFLineCapType.values[map['lineCapType'] as int];
lineJoinType = BMFLineJoinType.values[map['lineJoinType'] as int];
isThined = map['isThined'] as bool;
clickable = map['clickable'] as bool;
isKeepScale = map['isKeepScale'] as bool;
isFocus = map['isFocus'] as bool;
}