Google.Maps.JsonEnumTypeConverter.AsLocationType C# (CSharp) Method

AsLocationType() public static method

public static AsLocationType ( string s ) : LocationType
s string
return LocationType
        public static LocationType AsLocationType(string s)
        {
            var result = LocationType.Unknown;

            switch(s)
            {
                case "ROOFTOP":
                    result = LocationType.Rooftop;
                    break;
                case "RANGE_INTERPOLATED":
                    result = LocationType.RangeInterpolated;
                    break;
                case "GEOMETRIC_CENTER":
                    result = LocationType.GeometricCenter;
                    break;
                case "APPROXIMATE":
                    result = LocationType.Approximate;
                    break;
            }

            return result;
        }