public WmsVersion(WmsVersionEnum version) { Version = version; switch (version) { case WmsVersionEnum.Version_1_0_0: VersionString = "1.0.0"; break; case WmsVersionEnum.Version_1_0_7: VersionString = "1.0.7"; break; case WmsVersionEnum.Version_1_1_0: VersionString = "1.1.0"; break; case WmsVersionEnum.Version_1_1_1: VersionString = "1.1.1"; break; default: //case WmsVersionEnum.Version_1_3_0: VersionString = "1.3.0"; break; } WmsCapabilityNodeTag = version < WmsVersionEnum.Version_1_3_0 ? "WMT_MS_Capability" : "WMS_Capability"; }
public WmsVersion(string version) { VersionString = version; switch (version) { case "1.0.0": Version = WmsVersionEnum.Version_1_0_0; break; case "1.0.7": Version = WmsVersionEnum.Version_1_0_7; break; case "1.1.0": Version = WmsVersionEnum.Version_1_1_0; break; case "1.1.1": Version = WmsVersionEnum.Version_1_1_0; break; default: //case "1.3.0": Version = WmsVersionEnum.Version_1_3_0; VersionString = "1.3.0"; break; } }
public static string WmsSchemaUrl(WmsVersionEnum version, string schemaName) { const string urlFormat = "http://schemas.opengis.net/wms/{0}.{1}.{2}/{3}_{0}_{1}_{2}.dtd"; var versionBytes = BitConverter.GetBytes((int)version); if (!BitConverter.IsLittleEndian) { Array.Reverse(versionBytes); } return(string.Format(urlFormat, versionBytes[0], versionBytes[1], versionBytes[2], schemaName)); }
public WmsCapabilities(WmsVersionEnum version) { Version = new WmsVersion(version); }
internal static string System(WmsVersionEnum version, string name) { const string urlFormat = "http://schemas.opengis.net/wms/{0}.{1}.{2}/{4}_{0}_{1}_{2}.dtd"; var versionBytes = BitConverter.GetBytes((int)version); if (!BitConverter.IsLittleEndian) Array.Reverse(versionBytes); return string.Format(urlFormat, versionBytes[0], versionBytes[1], versionBytes[2], name); }