paths property
List<BoundedPath>
paths
Implementation
List<BoundedPath> get paths {
if (type == TileFeatureType.point) {
throw StateError('Cannot get paths from a point feature');
}
final modelLines = _modelLines;
if (modelLines != null) {
assert(type == TileFeatureType.linestring);
final uiGeometry = UiGeometry();
_paths = modelLines
.map((e) => BoundedPath(uiGeometry.createLine(e)))
.toList(growable: false);
_modelLines = null;
}
final modelPolygons = _modelPolygons;
if (modelPolygons != null) {
assert(type == TileFeatureType.polygon);
final uiGeometry = UiGeometry();
_paths = modelPolygons
.map((e) => BoundedPath(uiGeometry.createPolygon(e)))
.toList(growable: false);
_modelPolygons = null;
}
return _paths;
}