Пример #1
0
        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";
        }
Пример #2
0
        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";
        }
Пример #3
0
        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;
            }
        }
Пример #4
0
        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));
        }
Пример #5
0
 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 WmsCapabilities(WmsVersionEnum version)
 {
     Version = new WmsVersion(version);
 }
Пример #7
0
        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);
        }
Пример #8
0
 public WmsCapabilities(WmsVersionEnum version)
 {
     Version = new WmsVersion(version);
 }