protected Map GetMap(IContextRequest request) { string type = request.GetParam("MAP_TYPE"); if (String.IsNullOrEmpty(type)) { throw new WmsParameterNotSpecifiedException("MAP_TYPE"); } if (String.Equals(type, "DEF", StringComparison.InvariantCultureIgnoreCase)) { return(ShapefileHelper.Default()); } if (String.Equals(type, "SPH", StringComparison.InvariantCultureIgnoreCase)) { return(ShapefileHelper.Spherical()); } if (String.Equals(type, "SQL", StringComparison.InvariantCultureIgnoreCase)) { return(DatabaseHelper.SqlServer()); } if (String.Equals(type, "BRU", StringComparison.InvariantCultureIgnoreCase)) { return(BruTileHelper.Osm()); } string format = String.Format("unsupported map type: '{0}'", type); throw new NotSupportedException(format); }
protected Map GetMap(HttpRequest request) { string type = request.Params["MAP_TYPE"]; if (String.Equals(type, "DEF", StringComparison.InvariantCultureIgnoreCase)) { return(ShapefileHelper.Default()); } if (String.Equals(type, "SPH", StringComparison.InvariantCultureIgnoreCase)) { return(ShapefileHelper.Spherical()); } if (String.Equals(type, "SQL", StringComparison.InvariantCultureIgnoreCase)) { return(DatabaseHelper.SqlServer()); } string format = String.Format("unsupported map type: '{0}'", type); throw new NotSupportedException(format); }