|
POST
|
You might have defined a default legend style in your app that would overwrite the standard legend style. Look in your app if there is no style defined for the legend (for example in app.xaml)
... View more
03-19-2014
10:24 AM
|
0
|
0
|
942
|
|
POST
|
Hello Team, I have few "Graphics Layers" in my map control. When "Graphics" is selected from 1st Graphics Layer it should be highlighted in "Red" color. When "Graphics" is selected from 2nd Graphics Layer it should be highlighted in "Blue" color. When "Graphics" is selected from 3rd Graphics Layer it should be highlighted in "Green" color. How can I achieve this using the "ControlTemplate" inside "SimpleRenderer" in the XAML file ? Should I have to declare one "SimpleRenderer" for each Graphics Layer ? Please advise. Can I change the "Selection Color" somehow in the code behind .cs file ? Any help is appreciated. Thank you for your time. Thanks Adam You are right, you have to declare one SimpleRenderer for each graphic layer with a symbol that you can declare in XAML with a 'selection' state. Something like: <ControlTemplate>
<Ellipse x:Name="ellipse"
Fill="{Binding Symbol.Color}"
Width="{Binding Symbol.Size}"
Height="{Binding Symbol.Size}"
Stroke="Black"
StrokeThickness="1"
>
<Ellipse.Resources>
<Storyboard x:Key="SelectionAnimation">
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ellipse"
Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0:0:0"
Value="Red" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</Ellipse.Resources>
<vsm:VisualStateManager.VisualStateGroups>
<vsm:VisualStateGroup x:Name="SelectionStates">
<vsm:VisualState x:Name="Unselected" />
<vsm:VisualState x:Name="Selected"
Storyboard="{StaticResource SelectionAnimation}" />
</vsm:VisualStateGroup>
</vsm:VisualStateManager.VisualStateGroups>
</Ellipse>
</ControlTemplate>
... View more
03-19-2014
01:29 AM
|
0
|
0
|
482
|
|
POST
|
Additionally to cc4ever solution, the issue may also be coming when you select a point feature only. Such a feature has no extent, so you might have to use a minimum extent size. Something like: Dim minExtentSize As Double = 45
Dim widthExpand As Double = Math.Min(selectedFeatureExtent.Width * (expandPercentage / 100), minExtentSize)
Dim heightExpand As Double = Math.Min(selectedFeatureExtent.Height * (expandPercentage / 100), minExtentSize)
... View more
03-19-2014
01:12 AM
|
0
|
0
|
554
|
|
POST
|
May be better to post your question on the Silverlight Viewer forum.
... View more
03-19-2014
01:07 AM
|
0
|
0
|
472
|
|
POST
|
There is no builtin functionality to do that in the API. You can consider the following possible options (by ascendant order of complexity): - refresh your layer based on a timer - publish a service providing the latest modification date and use it (based on a timer) to know if you have to refresh the layer or not - create your own web service that alerts you when a modification has been done
... View more
03-19-2014
01:05 AM
|
0
|
0
|
397
|
|
POST
|
This means that your service is secured and you need to login before accessing to the service. You have to use the IdentityManager. Two options: - challenge the user for username/password. The easiest way is to use the toolkit SiginDialog (see interactive SDK SignInDialog sample) - generate a token for a predefined username/password using GenerateCredentialAsync and then add the credential to IM.
... View more
03-19-2014
01:00 AM
|
1
|
1
|
9987
|
|
POST
|
That seems the normal behavior. WmsLayer has 2 properties concerning SRs: - SpatialReference = Default Spatial Reference, i.e the first SR as you noticed - SupportedSpatialReferenceIDs = enumeration of supported spatial reference IDs. You should be able to display the WMS layer whatever the map SR in the SupportedSpatialReferenceIDs. For example the following WebMercator map displays correctly the WMS layer despite its default SR is Geographic.
<esri:Map UseAcceleratedDisplay="True" WrapAround="True" Extent="-15000000,2000000,-7000000,8000000">
<esri:ArcGISTiledMapServiceLayer
Url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
<esri:WmsLayer ID="OtherWMSLayer"
Url="http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi"
SkipGetCapabilities="False"
Layers="nexrad-n0r"
Version="1.1.1"
Opacity="0.7" />
</esri:Map>
Did you notice a particular issue whith that?
... View more
02-20-2014
10:33 PM
|
0
|
0
|
832
|
|
POST
|
Good catch. Should be fixed with the next version (10.2.2). Thanks for reporting that.
... View more
02-20-2014
09:55 PM
|
0
|
0
|
965
|
|
POST
|
Did you look at the PortalSearch sample which seems clos of what you are looking for?
... View more
02-12-2014
05:28 AM
|
0
|
0
|
537
|
|
POST
|
Can't anybody say where I can read about how layerItemVM.IsEnabled formed from the map layers properties? For a layer, layerItemVM.IsEnabled represents the layer.Visible property so "{Binding IsEnabled, Mode=TwoWay}" should be equivalent to "{Binding Layer.Visible, Mode=TwoWay}" for the layers. However layerItemVM.IsEnabled is more generic since it can manage the sublayer visibility as well (for the layer that supports changing the sublayer visibilities such as a non cached ArcGISDynamicMapServiceLayer). In case your layer doesn't support changing sublayer visibilities (e.g an ArcGISTiledMapServiceLayer), changing layerItemVM.IsEnabled has no effect while changing Layer.Visible toggles the whole layer visibility i.e the visibility of all sublayers.
... View more
02-12-2014
05:16 AM
|
0
|
0
|
563
|
|
POST
|
The solution proposed by Chris is correct and is even the only way to manage visibility of sublayers in the legend. For the layers you don't want in the legend, you can also set the ShowLegend flag to false (either in XAML or by code).
... View more
02-12-2014
04:52 AM
|
0
|
0
|
1067
|
|
POST
|
DynamicMapService layers are automatically projected in the map Spatial Reference by the server. Set 2 layers in your map: OpenStreetMapLayer DynamipMapServiceLayer And that's it. Sidenote: OpenStreetMap is not in EPSG:4326 but in WebMercator. Your map initial extent coordinates must use this SR.
... View more
02-03-2014
01:27 AM
|
0
|
0
|
576
|
|
POST
|
What is this IJsonSerializable interface for? Do you know if I need to extend that as well in my project for it to work properly? The IJsonSerializable interface is mainly for being able to print the graphics at server side. Without implementing this interface, the graphics using your symbol will be printed with a default symbol. Also, you mentioned this other SimpleMarkerSymbol class in ESRI.ArcGIS.Client.FeatureService.Symbols, what is the difference between that class and the one I am using? ESRI.ArcGIS.Client.FeatureService.Symbols is used internally to create symbols for feature services.
... View more
01-23-2014
05:38 AM
|
0
|
0
|
1074
|
|
POST
|
You are righ SimpleMarkrSymbol is not meant for subclassing. You have to subclass MarkerSymbol and define the Dependency Properties you need. One easier, but not supported, way to do it is to use the internal ESRI.ArcGIS.Client.FeatureService.Symbols.SimpleMarkerSymbol which has OutlineColor and OutLineThickness properties.
... View more
01-22-2014
11:25 PM
|
0
|
0
|
1074
|
|
POST
|
No the standard SimpleFillSymbol doesn't support dashed lines. The supported way to do it is to define your own serializable symbol. The easiest but unsupported way is to use the internal ESRI.ArcGIS.Client.FeatureService.Symbols.SimpleFillSymbol. Something like:
....
xmlns:symbols="clr-namespace:ESRI.ArcGIS.Client.FeatureService.Symbols;assembly=ESRI.ArcGIS.Client">
......
<esri:LayerDrawingOptions.Renderer>
<esri:SimpleRenderer>
<esri:SimpleRenderer.Symbol>
<symbols:SimpleFillSymbol BorderBrush="#74E01B" BorderThickness="1" Fill="#7074E01B" BorderStyle="DashDotDot" />
</esri:SimpleRenderer.Symbol>
</esri:SimpleRenderer>
</esri:LayerDrawingOptions.Renderer>
... View more
01-13-2014
10:46 PM
|
0
|
0
|
1720
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-14-2025 09:24 AM | |
| 1 | 06-13-2013 09:22 AM | |
| 1 | 04-29-2022 02:21 AM | |
| 1 | 04-29-2022 02:28 AM | |
| 1 | 09-07-2021 03:12 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-30-2025
08:06 AM
|