${IS6_ThemeDotDensity_Title}

${IS6_ThemeDotDensity_Description}

${IS6_ThemeDotDensity_Description_1}

Inheritance: Theme
        internal static string ToJson(ThemeDotDensity param)
        {
            if (param == null)
            {
                return null;
            }
            string json = "{";
            List<string> list = new List<string>();

            if (param.DotStyle != null)
            {
                list.Add(string.Format("\"dotStyle\":{0}", ServerStyle.ToJson(param.DotStyle)));
            }
            list.Add(string.Format("\"dotValue\":{0}", param.DotValue));
            if (!string.IsNullOrEmpty(param.Expression))
            {
                list.Add(string.Format("\"expression\":\"{0}\"", param.Expression));
            }

            json += string.Join(",", list.ToArray());
            json += ",";
            json += Theme.AddList(param);
            json += "}";

            return json;
        }
        //制作满足条件国家的人口密度专题图,并显示国家标签
        private void commit_Click(object sender, RoutedEventArgs e)
        {
            //标签专题图
            ThemeLabel label = new ThemeLabel()
            {
                Caption = "标签专题图",
                Expression = "Country",
                Display = new ServerTextStyle()
                {
                    FontHeight = 10,
                    FontWidth = 0,
                    Color = new ServerColor(0, 0, 0),
                    FontName = "微软雅黑"
                },
                Filter = "SmID > 220",
            };

            ThemeDotDensity dotDensity = new ThemeDotDensity()
            {
                Caption = "点密度专题图",
                Expression = "Pop_1994",
                DotStyle = new ServerStyle()
                {
                    SymbolSize = 20,
                    SymbolStyle = 1,
                },
                DotValue = 11281396.89000,
                Filter = "SmID > 220",
            };

            CompositeParam composite = new CompositeParam()
            {
                ThemeLayer = "World@world",
                Themes = new List<Theme> { label, dotDensity },
            };

            CompositeThemeParameters parameters = new CompositeThemeParameters()
            {
                LayerNames = layerNames,
                MapName = "World",
                ParamList = new List<CompositeParam>(){composite},
            };

            //与服务器交互
            CompositeThemeService service = new CompositeThemeService("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);
        }