uniqueValueRenderer.Attribute = "ROW_LEFT"; string strValueassg = ""; UniqueValueInfo uniqueValueInfo = new UniqueValueInfo(); foreach (Graphic graphic in e.FeatureSet.Features) { string sss = graphic.Attributes["ROW_LEFT"].ToString(); string ddd = graphic.Attributes["ROW_RIGHT"].ToString(); string strUniqueLabel = graphic.Attributes["ROW_LEFT"].ToString() + "-" + graphic.Attributes["ROW_RIGHT"].ToString(); graphicsLayer.Graphics.Add(graphic); Random random = new Random(); SimpleLineSymbol symbol = new SimpleLineSymbol(); if (strUniqueLabel != "" && strUniqueLabel != strValueassg) { symbol.Color = new SolidColorBrush(Color.FromArgb(255, (byte)random.Next(0, 255), (byte)random.Next(0, 255), (byte)random.Next(0, 255))); symbol.Width = 3; uniqueValueInfo.Symbol = symbol; uniqueValueInfo.Value = graphic.Attributes["ROW_LEFT"]; uniqueValueInfo.Label = strUniqueLabel; uniqueValueRenderer.Infos.Add(uniqueValueInfo); graphicsLayer.Renderer = uniqueValueRenderer; } strValueassg = graphic.Attributes["ROW_LEFT"].ToString() + "-" + graphic.Attributes["ROW_RIGHT"].ToString(); }
<esri:UniqueValueRenderer x:Name="uniqueValueRenderer"> </esri:UniqueValueRenderer> uniqueValueRenderer.Attribute = "ROW_RIGHT"; string strValueassg = ""; UniqueValueInfo uniqueValueInfo = new UniqueValueInfo(); foreach (Graphic graphic in e.FeatureSet.Features) { string strUniqueLabel = graphic.Attributes["ROW_LEFT"].ToString() + "-" + graphic.Attributes["ROW_RIGHT"].ToString(); graphicsLayer.Graphics.Add(graphic); Random random = new Random(); SimpleLineSymbol symbol = new SimpleLineSymbol(); if (strUniqueLabel != "" && strUniqueLabel != strValueassg) { symbol.Color = new SolidColorBrush(Color.FromArgb(255, (byte)random.Next(0, 255), (byte)random.Next(0, 255), (byte)random.Next(0, 255))); symbol.Width = 3; } uniqueValueInfo.Symbol = symbol; uniqueValueInfo.Value = graphic.Attributes["ROW_RIGHT"]; uniqueValueInfo.Label = strUniqueLabel; strValueassg = graphic.Attributes["ROW_LEFT"].ToString() + "-" + graphic.Attributes["ROW_RIGHT"].ToString(); } uniqueValueRenderer.Infos.Add(uniqueValueInfo); graphicsLayer.Renderer = uniqueValueRenderer;
<esri:ClassBreaksRenderer x:Key="MyClassBreaksRenderer" Attribute="POP1990" > <esri:ClassBreaksRenderer.Classes> <esri:ClassBreakInfo MinimumValue="0" MaximumValue="30000" Symbol="{StaticResource MySmallMarkerSymbol}" /> <esri:ClassBreakInfo MinimumValue="30000" MaximumValue="300000" Symbol="{StaticResource MyMediumMarkerSymbol}" /> <esri:ClassBreakInfo MinimumValue="300000" MaximumValue="5000000" Symbol="{StaticResource MyLargeMarkerSymbol}" /> </esri:ClassBreaksRenderer.Classes> </esri:ClassBreaksRenderer>
<esri:Legend Map="{Binding ElementName=MyMap}" VerticalAlignment="Top" HorizontalAlignment="Right" />
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.