${IS6_ThemeService_Title}

${IS6_ThemeService_Description}

Inheritance: SuperMap.Web.Service.ServiceBase
        //对1994年人口字段制作标签专题图
        private void commit_Click(object sender, RoutedEventArgs e)
        {
            ThemeLabel label = new ThemeLabel()
            {
                Caption = "标签专题图",
                Expression = "Country",
                Display = new ServerTextStyle()
                {
                    FontHeight = 5,
                    FontWidth = 0,
                    Color = new ServerColor(100, 100, 220),
                    FontName = "微软雅黑" ,
                },
                AutoAvoidOverlapped = true,
            };

            ThemeParameters parameters = new ThemeParameters()
            {
                MapName = "World",
                Theme = label,
                LayerNames = layerNames,
                ThemeLayer = "World@world"
            };

            ThemeService service = new ThemeService("http://localhost/IS/AjaxDemo");
            service.ProcessAsync(parameters);
            service.Failed += new EventHandler<ServiceFailedEventArgs>(service_Failed);
            service.ProcessCompleted += new EventHandler<ThemeEventArgs>(service_ProcessCompleted);
        }
        //等级符号专题图
        private void commit_Click(object sender, RoutedEventArgs e)
        {
            ThemeGraduatedSymbol graduatedSymbol = new ThemeGraduatedSymbol()
            {
                Caption = "等级符号专题图",
                Expression = "Pop_1994",
                DefinitionValue = 1000000000,
                GraduatedMode = GraduatedMode.Constant,
                StyleForPositive = new ServerStyle() { SymbolSize = 200, SymbolStyle = 63, PenColor = new ServerColor(228, 142, 48) }
            };

            ThemeParameters parameters = new ThemeParameters()
            {
                MapName = "World",
                Theme = graduatedSymbol,
                LayerNames = layerNames,
                ThemeLayer = "World@world"
            };

            //与服务器交互
            ThemeService service = new ThemeService("http://localhost/IS/AjaxDemo");
            service.ProcessAsync(parameters);
            service.Failed += new EventHandler<ServiceFailedEventArgs>(service_Failed);
            service.ProcessCompleted += new EventHandler<ThemeEventArgs>(service_ProcessCompleted);
        }
        //点密度专题图
        private void commit_Click(object sender, RoutedEventArgs e)
        {
            //如果字段表达式为空则用下拉列表中选择字段来制作单值专题图
            string str;
            if (!string.IsNullOrEmpty(filterField.Text) && !(filterField.Text == ""))
            {
                str = filterField.Text;
            }
            else
            {
                str = setField.SelectedItem.ToString();
            }

            ThemeDotDensity dotDensity = new ThemeDotDensity()
            {
                Caption = "点密度专题图",
                Expression = str,
                DotStyle = new ServerStyle()
                {
                    SymbolSize = 20,
                    SymbolStyle = 1,
                },
                DotValue = Convert.ToDouble(baseValue.Text)
            };

            ThemeParameters parameters = new ThemeParameters()
            {
                MapName = "World",
                Theme = dotDensity,
                LayerNames = layerNames,
                ThemeLayer = "World@world"
            };

            //与服务器交互
            ThemeService service = new ThemeService("http://localhost/IS/AjaxDemo");
            service.ProcessAsync(parameters);
            service.Failed += new EventHandler<ServiceFailedEventArgs>(service_Failed);
            service.ProcessCompleted += new EventHandler<ThemeEventArgs>(service_ProcessCompleted);
        }
        //范围分段专题图
        private void commit_Click(object sender, RoutedEventArgs e)
        {
            List<ServerStyle> themeStyles = new List<ServerStyle>();
            ServerStyle themeStyle1 = new ServerStyle() { BrushColor = new ServerColor(216, 244, 254) };
            ServerStyle themeStyle2 = new ServerStyle() { BrushColor = new ServerColor(131, 232, 252) };
            ServerStyle themeStyle3 = new ServerStyle() { BrushColor = new ServerColor(112, 212, 243) };
            ServerStyle themeStyle4 = new ServerStyle() { BrushColor = new ServerColor(23, 198, 238) };
            ServerStyle themeStyle5 = new ServerStyle() { BrushColor = new ServerColor(0, 187, 236) };
            ServerStyle themeStyle6 = new ServerStyle() { BrushColor = new ServerColor(0, 133, 236) };

            themeStyles.Add(themeStyle1);
            themeStyles.Add(themeStyle2);
            themeStyles.Add(themeStyle3);
            themeStyles.Add(themeStyle4);
            themeStyles.Add(themeStyle5);
            themeStyles.Add(themeStyle6);

            ThemeRange range = new ThemeRange()
            {
                BreakValues = new List<double>() { 6000000, 10000000, 50000000, 100000000, 500000000 },
                Caption = "范围分段专题图",
                Displays = themeStyles,
                Expression = "Pop_1994",
            };

            ThemeParameters parameters = new ThemeParameters
            {
                MapName = "World",
                Theme = range,
                LayerNames = layerNames,
                ThemeLayer = "World@world"
            };

            //与服务器交互
            ThemeService service = new ThemeService("http://localhost/IS/AjaxDemo");
            service.ProcessAsync(parameters);
            service.Failed += new EventHandler<ServiceFailedEventArgs>(service_Failed);
            service.ProcessCompleted += new EventHandler<ThemeEventArgs>(service_ProcessCompleted);
        }
        //栅格范围分段专题图
        private void commit_Click(object sender, RoutedEventArgs e)
        {
            List<ServerColor> colors = new List<ServerColor>();
            ServerColor color1 = new ServerColor(255, 0, 0);
            ServerColor color2 = new ServerColor(0, 255, 0);
            ServerColor color3 = new ServerColor(0, 0, 255);
            ServerColor color4 = new ServerColor(255, 255, 0);
            ServerColor color5 = new ServerColor(255, 0, 255);
            ServerColor color6 = new ServerColor(0, 255, 255);

            colors.Add(color1);
            colors.Add(color2);
            colors.Add(color3);
            colors.Add(color4);
            colors.Add(color5);
            colors.Add(color6);

            ThemeGridRange gridRange = new ThemeGridRange()
            {
                BreakValues = new List<double>() { 1200, 1250, 1300, 1350, 1400 },
                Caption = "栅格范围分段专题图",
                Displays = colors
            };

            ThemeParameters parameters = new ThemeParameters()
            {
                MapName = "DEM",
                Theme = gridRange,
                LayerNames = layerNames,
                ThemeLayer = "DEM@dem"
            };

            //与服务器交互
            ThemeService service = new ThemeService("http://localhost/IS/AjaxDemo");
            service.ProcessAsync(parameters);
            service.Failed += new EventHandler<ServiceFailedEventArgs>(service_Failed);
            service.ProcessCompleted += new EventHandler<ThemeEventArgs>(service_ProcessCompleted);
        }
        //单值专题图
        private void commit_Click(object sender, RoutedEventArgs e)
        {
            List<ServerStyle> themeStyle = new List<ServerStyle>();
            ServerStyle themeStyle1 = new ServerStyle() { BrushColor = new ServerColor(157, 127, 255), PenColor = new ServerColor(197, 17, 21) };
            ServerStyle themeStyle2 = new ServerStyle() { BrushColor = new ServerColor(250, 237, 195), PenColor = new ServerColor(33, 180, 40) };
            ServerStyle themeStyle3 = new ServerStyle() { BrushColor = new ServerColor(59, 188, 230), PenColor = new ServerColor(116, 122, 235) };
            ServerStyle themeStyle4 = new ServerStyle() { BrushColor = new ServerColor(1, 128, 171), PenColor = new ServerColor(16, 122, 235) };
            ServerStyle themeStyle5 = new ServerStyle() { BrushColor = new ServerColor(167, 219, 232), PenColor = new ServerColor(116, 122, 25) };
            ServerStyle themeStyle6 = new ServerStyle() { BrushColor = new ServerColor(192, 214, 54), PenColor = new ServerColor(116, 12, 235) };

            themeStyle.Add(themeStyle1);
            themeStyle.Add(themeStyle2);
            themeStyle.Add(themeStyle3);
            themeStyle.Add(themeStyle4);
            themeStyle.Add(themeStyle5);
            themeStyle.Add(themeStyle6);

            SuperMap.Web.ISDotNET6.ThemeUnique unique = new SuperMap.Web.ISDotNET6.ThemeUnique()
            {
                Caption = "制作国家的单值专题图",
                Expression = "Country",
                Displays = themeStyle,
                Values = new List<string>() { "俄罗斯", "中华人民共和国", "印度", "美国", "巴西", "澳大利亚" },
            };

            ThemeParameters parameters = new ThemeParameters()
            {
                MapName = "World",
                Theme = unique,
                LayerNames = layerNames,
                ThemeLayer = "World@world"
            };

            ThemeService service = new ThemeService("http://localhost/IS/AjaxDemo");
            service.ProcessAsync(parameters);
            service.Failed += new EventHandler<ServiceFailedEventArgs>(service_Failed);
            service.ProcessCompleted += new EventHandler<ThemeEventArgs>(service_ProcessCompleted);
        }
        //移除专题图,即生成一个空专题图
        private void remove_Click(object sender, RoutedEventArgs e)
        {
            ThemeParameters clearDotDensityParameters = new ThemeParameters()
            {
                MapName = "World",
                Theme = null,
                LayerNames = layerNames,
                ThemeLayer = "World@world"
            };

            //与服务器交互
            ThemeService service = new ThemeService("http://localhost/IS/AjaxDemo");
            service.ProcessAsync(clearDotDensityParameters);
            service.Failed += new EventHandler<ServiceFailedEventArgs>(service_Failed);
            service.ProcessCompleted += new EventHandler<ThemeEventArgs>(service_ProcessCompleted);
        }
        //制作统计专题图
        private void commit_Click(object sender, RoutedEventArgs e)
        {
            List<ServerStyle> themeStyles = new List<ServerStyle>();
            themeStyles.Add(new ServerStyle() { BrushColor = new ServerColor(125, 0, 0) });
            themeStyles.Add(new ServerStyle() { BrushColor = new ServerColor(220, 50, 127) });

            ThemeGraph graph = new ThemeGraph()
            {
                Caption = "统计专题图",
                Expressions = new List<string>() { "SmArea", "Pop_1994" },
                GraduatedMode = (GraduatedMode)setGradutedMode.SelectedIndex,
                GraphStyles = themeStyles,
                GraphType = (GraphType)setGraphType.SelectedItem,
                OnTop = true,
                ShowItemText = (bool)isItemText.IsChecked,
                ItemTextFormat = (GraphTextFormat)(setGraphTextFormat.SelectedIndex + 1),
                ItemCaptions = new List<string>() { "面积", "人口" },
                ShowAxes = (bool)isAxes.IsChecked,
                ShowAxisGrid = (bool)isAxesGrid.IsChecked,
                MaxSumSize = 100,
                MinSumSize = 20,
            };

            ThemeParameters parameters = new ThemeParameters()
            {
                MapName = "World",
                Theme = graph,
                LayerNames = layerNames,
                ThemeLayer = "World@world"
            };

            ThemeService service = new ThemeService("http://localhost/IS/AjaxDemo");
            service.ProcessAsync(parameters);
            service.Failed += new EventHandler<ServiceFailedEventArgs>(service_Failed);
            service.ProcessCompleted += new EventHandler<ThemeEventArgs>(service_ProcessCompleted);
        }