${IS6_ServerStyle_Title}
${IS6_ServerStyle_Description}
//范围分段专题图 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<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); }
/// <summary>${IS6_ThemeUnique_constructor_None_D}</summary> public ThemeUnique() { DefaultStyle = new ServerStyle(); }
internal static string ToJson(ServerStyle param) { if (param == null) { return null; } string json = "{"; List<string> list = new List<string>(); list.Add(string.Format("\"brushBackColor\":{0}", ServerColor.ToJson(param.BrushBackColor))); list.Add(string.Format("\"brushBackTransparent\":{0}", param.BrushBackTransparent.ToString().ToLower())); list.Add(string.Format("\"brushColor\":{0}", ServerColor.ToJson(param.BrushColor))); list.Add(string.Format("\"brushGradientAngle\":{0}", param.BrushGradientAngle)); list.Add(string.Format("\"brushGradientCenterOffsetX\":{0}", param.BrushGradientCenterOffsetX)); list.Add(string.Format("\"brushGradientCenterOffsetY\":{0}", param.BrushGradientCenterOffsetY)); list.Add(string.Format("\"brushGradientMode\":{0}", (int)param.BrushGradientMode)); list.Add(string.Format("\"brushOpaqueRate\":{0}", param.BrushOpaqueRate)); list.Add(string.Format("\"brushStyle\":{0}", param.BrushStyle)); list.Add(string.Format("\"penColor\":{0}", ServerColor.ToJson(param.PenColor))); list.Add(string.Format("\"penStyle\":{0}", param.PenStyle)); list.Add(string.Format("\"penWidth\":{0}", param.PenWidth)); list.Add(string.Format("\"symbolRotation\":{0}", param.SymbolRotation)); list.Add(string.Format("\"symbolSize\":{0}", param.SymbolSize)); list.Add(string.Format("\"symbolStyle\":{0}", param.SymbolStyle)); json += string.Join(",", list.ToArray()); json += "}"; return json; }
/// <summary>${IS6_ServerStyle_method_FromJson_D}</summary> /// <param name="jsonObject">${IS6_ServerStyle_method_FromJson_param_jsonObject}</param> /// <returns>${IS6_ServerStyle_method_FromJson_return}</returns> public static ServerStyle FromJson(JsonObject jsonObject) { if (jsonObject == null) { return null; } ServerStyle result = new ServerStyle { BrushBackColor = ServerColor.FromJson((int)jsonObject["brushBackColor"]), BrushBackTransparent = (bool)jsonObject["brushBackTransparent"], BrushColor = ServerColor.FromJson((int)jsonObject["brushColor"]), BrushGradientAngle = (int)jsonObject["brushGradientAngle"], BrushGradientCenterOffsetX = (int)jsonObject["brushGradientCenterOffsetX"], BrushGradientCenterOffsetY = (int)jsonObject["brushGradientCenterOffsetY"], BrushGradientMode = (BrushGradientMode)(int)jsonObject["brushGradientMode"], BrushOpaqueRate = (int)jsonObject["brushOpaqueRate"], BrushStyle = (int)jsonObject["brushStyle"], PenColor = ServerColor.FromJson((int)jsonObject["penColor"]), PenStyle = (int)jsonObject["penStyle"], PenWidth = (int)jsonObject["penWidth"], SymbolRotation = (double)jsonObject["symbolRotation"], SymbolSize = (int)jsonObject["symbolSize"], SymbolStyle = (int)jsonObject["symbolStyle"], }; return result; }
/// <summary>${IS6_ThemeDotDensity_constructor_None_D}</summary> public ThemeDotDensity() { DotStyle = new ServerStyle(); }