<esri:UniqueValueInfo Value="Arizona" Symbol="{StaticResource MyRedFillSymbol}" />
<esri:UniqueValueInfo Value="Arizona" Source="/Assets/images/PushPin3.png"/>
<esri:UniqueValueInfo Value="Arizona" Symbol="{SOME ESRI SYMBOL}" />
That possible or wise?Code:<esri:UniqueValueInfo Value="Arizona" Source="/Assets/images/PushPin3.png"/>Code:<esri:UniqueValueInfo Value="Arizona" Symbol="{SOME ESRI SYMBOL}" />
<esri:FeatureLayer ID="MyFeatureLayerClassBreak" Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0" Where="STATE_NAME in ('New Mexico', 'Arizona', 'Texas')" Renderer="{StaticResource MyClassBreaksRenderer}" OutFields="POP1990" />
<esri:GraphicsLayer ID="MyGraphicsLayerListBox1" MouseLeftButtonDown="GraphicsLayer_MouseLeftButtonDown" MouseEnter="imageList1_Mousehover" Visible="False" />
For Each selectedGraphic As Graphic In args.FeatureSet.Features selectedGraphic.Symbol = TryCast(LayoutRoot.Resources("StrobeMarkerSymbol_Blue"), ESRI.ArcGIS.Client.Symbols.Symbol) 'selectedGraphic.Symbol = TryCast(LayoutRoot.Resources("MyUniqueValueRenderer"), ESRI.ArcGIS.Client.Symbols.Symbol) _resultsGraphicsLayer.Graphics.Add(selectedGraphic) Next selectedGraphic
I also noticed that the Renderer is workign on a Feature Layer....I have a grpahics layerTHINK I AM HAVING issues because its a graphics layer....Can I even do this on a graphics layer?
Do I have to set this up in VB?
<Grid x:Name="LayoutRoot" Background="{StaticResource BaseColor}"> <Grid.Resources> <esri:SimpleMarkerSymbol x:Key="BLUEMarkerSymbol" Color="Blue" Size="12" Style="Circle" /> <esri:SimpleMarkerSymbol x:Key="PURPLEMarkerSymbol" Color="Purple" Size="12" Style="Circle" /> <esri:UniqueValueRenderer x:Key="MyUniqueValueRenderer" Attribute="TYPE" > <esri:UniqueValueRenderer.Infos> <esri:UniqueValueInfo Value="Church" Symbol="{StaticResource BLUEMarkerSymbol}" /> <esri:UniqueValueInfo Value="SCHOOL" Symbol="{StaticResource PURPLEMarkerSymbol}" /> </esri:UniqueValueRenderer.Infos> </esri:UniqueValueRenderer> </Grid.Resources> <Grid Grid.Row="2"> </esri:Map.Extent> <esri:Map.Layers> <esri:GraphicsLayer ID="MyGraphicsLayerBufferResults" MouseEnter="imageBuffer_Mousehover" MouseLeftButtonDown="GraphicsLayerBuffer_MouseLeftButtonDown" Renderer="MyUniqueValueRenderer" > </esri:Map.Layers> </esri:Map>
_resultsGraphicsLayer = TryCast(MyMap.Layers("MyGraphicsLayerBufferResults"), GraphicsLayer) If args.FeatureSet.Features.Count < 1 Then MessageBox.Show("No features found") Return End If For Each selectedGraphic As Graphic In args.FeatureSet.Features _resultsGraphicsLayer.Graphics.Add(selectedGraphic) Next selectedGraphic
I suggest you add a default symbol to your unique value renderer, so we will know if the issue is coming from the values of your attribute 'TYPE'.
<esri:SimpleMarkerSymbol x:Key="BLUEMarkerSymbol" Color="Blue" Size="12" Style="Circle" /> <esri:SimpleMarkerSymbol x:Key="PURPLEMarkerSymbol" Color="Purple" Size="12" Style="Circle" /> <esri:UniqueValueRenderer x:Key="MyUniqueValueRenderer" Attribute="TYPE" DefaultSymbol="BLUEMarkerSymbol" > <esri:UniqueValueRenderer.Infos> <esri:UniqueValueInfo Value="Church" Symbol="{StaticResource PURPLEMarkerSymbol}" /> <esri:UniqueValueInfo Value="SCHOOL" Symbol="{StaticResource PURPLEMarkerSymbol}" /> </esri:UniqueValueRenderer.Infos> </esri:UniqueValueRenderer>
<esri:UniqueValueRenderer x:Key="MyUniqueValueRenderer" Attribute="TYPE" DefaultSymbol="{StaticResource BLUEMarkerSymbol}"> <esri:UniqueValueRenderer.Infos> <esri:UniqueValueInfo Value="Church" Symbol="{StaticResource BLUEMarkerSymbol}" /> <esri:UniqueValueInfo Value="SCHOOL" Symbol="{StaticResource PURPLEMarkerSymbol}" /> </esri:UniqueValueRenderer.Infos> </esri:UniqueValueRenderer>
selectedGraphic.Symbol = TryCast(LayoutRoot.Resources("StrobeMarkerSymbol_Blue"), ESRI.ArcGIS.Client.Symbols.Symbol)
<!-- UNIQUE VALUE RENDERER --> <esri:SimpleMarkerSymbol x:Key="BLUEMarkerSymbol" Color="Blue" Size="12" Style="Circle" /> <esri:SimpleMarkerSymbol x:Key="PURPLEMarkerSymbol" Color="Purple" Size="12" Style="Circle" /> <esri:UniqueValueRenderer x:Key="MyUniqueValueRenderer" Attribute="TYPE" DefaultSymbol="{StaticResource BLUEMarkerSymbol}"> <esri:UniqueValueRenderer.Infos> <esri:UniqueValueInfo Value="Church" Symbol="{StaticResource PURPLEMarkerSymbol}" /> <esri:UniqueValueInfo Value="SCHOOL" Symbol="{StaticResource PURPLEMarkerSymbol}" /> </esri:UniqueValueRenderer.Infos> </esri:UniqueValueRenderer> <esri:GraphicsLayer ID="MyGraphicsLayerBufferResults" MouseEnter="imageBuffer_Mousehover" MouseLeftButtonDown="GraphicsLayerBuffer_MouseLeftButtonDown" Renderer="MyUniqueValueRenderer" > <esri:GraphicsLayer.MapTip> <Border esri:GraphicsLayer.MapTipHideDelay="00:00:01.5" CornerRadius="10" BorderBrush="#FF222957" BorderThickness="3" Margin="0,0,15,15"> <Border.Background> <LinearGradientBrush EndPoint="1.038,1.136" StartPoint="0.015,0.188"> <GradientStop Color="#FFD1DFF2"/> <GradientStop Color="#FF092959" Offset="0.946"/> </LinearGradientBrush> </Border.Background> <Border.Effect> <DropShadowEffect ShadowDepth="10" BlurRadius="14" Direction="300" /> </Border.Effect> <StackPanel Orientation="Vertical"> <StackPanel Orientation="Horizontal"> <TextBlock Text="Distance: " FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Bottom" /> <TextBlock Text="{Binding [BUFFER_DISTANCE]}" HorizontalAlignment="Left" VerticalAlignment="Center" /> <TextBlock Text=" meters from parcel" HorizontalAlignment="Left" VerticalAlignment="Bottom" /> </StackPanel> </StackPanel> </Border> </esri:GraphicsLayer.MapTip> </esri:GraphicsLayer>
Private Sub QueryTask_ExecuteCompletedBuffer2(ByVal sender As Object, ByVal args As QueryEventArgs) Dim featureSet As FeatureSet = args.FeatureSet If args.FeatureSet.Features.Count < 1 Then MessageBox.Show("No features found") Return End If For Each selectedGraphic As Graphic In args.FeatureSet.Features ' Commented out ' selectedGraphic.Symbol = TryCast(LayoutRoot.Resources("StrobeMarkerSymbol_Blue"), ESRI.ArcGIS.Client.Symbols.Symbol) _resultsGraphicsLayer.Graphics.Add(selectedGraphic) Next selectedGraphic
<esri:SimpleFillSymbol x:Key="MyYellowFillSymbol" Fill="#44FFFF00" BorderBrush="Transparent" BorderThickness="2" /> <esri:SimpleFillSymbol x:Key="MyRedFillSymbol" Fill="#44FF0000" BorderBrush="Transparent" BorderThickness="2" /> <esri:SimpleFillSymbol x:Key="MyBlueFillSymbol" Fill="Blue" BorderBrush="Transparent" BorderThickness="2" /> <esri:ClassBreaksRenderer x:Key="MyClassBreaksRenderer" Attribute="PRECINCTS_" DefaultSymbol="{StaticResource MyRedFillSymbol}"> <esri:ClassBreaksRenderer.Classes> <esri:ClassBreakInfo MinimumValue="0.0000" MaximumValue="8.0000" Symbol="{StaticResource MyYellowFillSymbol}" /> <esri:ClassBreakInfo MinimumValue="8.0001" MaximumValue="15.0000" Symbol="{StaticResource MyRedFillSymbol}" /> <esri:ClassBreakInfo MinimumValue="15.0001" MaximumValue="50.0000" Symbol="{StaticResource MyBlueFillSymbol}" /> </esri:ClassBreaksRenderer.Classes> </esri:ClassBreaksRenderer>
<esri:FeatureLayer ID="MG_PrecinctsClassBreak" Url="http://gis.logis.org/arcgis/rest/services/MG_Test/MapServer/6" Renderer="{StaticResource MyClassBreaksRenderer}" OutFields="PRECINCTS_" />
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.