${iServer2_Theme_ThemeDotDensity_Title}

${iServer2_Theme_ThemeDotDensity_Description}

상속: Theme
        internal static string ToJson(ThemeDotDensity param)
        {
            if (param == null)
            {
                return null;
            }
            string json = "{";

            List<string> list = new List<string>();
            if (!string.IsNullOrEmpty(param.DotExpression))
            {
                list.Add(string.Format("\"dotExpression\":\"{0}\"", param.DotExpression));
            }
            else
            {
                list.Add(string.Format("\"dotExpression\":null"));
            }

            if (param.Style != null)
            {
                list.Add(string.Format("\"style\":{0}", ServerStyle.ToJson(param.Style)));
            }
            else
            {
                list.Add(string.Format("\"style\":null"));
            }

            list.Add(string.Format("\"value\":{0}", param.Value));
            list.Add(string.Format("\"themeType\":5"));
            json += string.Join(",", list.ToArray());
            json += "}";

            return json;
        }
        //制作点密度专题图
        private void commit_Click(object sender, RoutedEventArgs e)
        {
            //如果字段表达式为空则用下拉列表中选择字段来制作单值专题图
            ThemeDotDensity theme = new ThemeDotDensity()
            {
                DotExpression = "Pop_1994",
                Value = 11281396.89000,
                Style = new ServerStyle()
                {
                    MarkerSize = 3,
                    LineColor = new ServerColor { Blue = 0, Green = 255, Red = 0 }
                }
            };

            ThemeParameters parameters = new ThemeParameters
            {
                MapName = "World",
                LayerName = "World@world" ,
                Theme = theme,
            };

            //与服务器交互
            ThemeService themeService = new ThemeService("http://localhost:7080/demo");
            themeService.ProcessAsync(parameters);
            themeService.Failed += new EventHandler<ServiceFailedEventArgs>(themeService_Failed);
            themeService.ProcessCompleted += new EventHandler<ThemeEventArgs>(themeService_ProcessCompleted);
        }
        /// <summary>${iServer2_ThemeDotDensity_method_FromJson_D}</summary>
        /// <returns>${iServer2_ThemeDotDensity_method_FromJson_return}</returns>
        /// <param name="jsonObject">${iServer2_ThemeDotDensity_method_FromJson_param_jsonObject}</param>
        public static ThemeDotDensity FromJson(JsonObject jsonObject)
        {
            if (jsonObject == null)
            {
                return null;
            }

            ThemeDotDensity result = new ThemeDotDensity();

            result.DotExpression = (string)jsonObject["dotExpression"];
            result.Style = ServerStyle.FromJson((JsonObject)jsonObject["style"]);
            result.Value = (double)jsonObject["value"];

            return result;
        }