Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public static regionTypeToType = (regionType: RegionType) => {
let type;
switch (regionType) {
case RegionType.Rectangle:
type = RegionDataType.Rect;
break;
case RegionType.Polygon:
type = RegionDataType.Polygon;
break;
case RegionType.Point:
type = RegionDataType.Point;
break;
case RegionType.Polyline:
type = RegionDataType.Polyline;
break;
default:
break;
}
return type;
}