|
POST
|
It's hard to tell what the problem is, you might need to debug through the code starting from CheckBox Click event handler. Figure out what get's added and removed from visibleLayerList.
... View more
02-11-2011
01:35 PM
|
0
|
0
|
793
|
|
POST
|
Do you have people and incidents in separate tables? I think you are talking about related records so I'll point you to try to understand this sample and see if it fits your needs: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#QueryRelatedRecords If you have people and incidents in the same service, you can perform aggregate linq query on the results, similar to http://msdn.microsoft.com/en-us/vbasic/bb737904#sumgroup. You can first group by person's name and then get the sum of their incidents.
... View more
02-11-2011
01:21 PM
|
0
|
0
|
2092
|
|
POST
|
ArcGISDynamicServiceLayer does not have a Renderer property unlike FeatureLayer. If you need to override the service renderer, you can use FeatureLayer instead.
... View more
02-11-2011
01:08 PM
|
0
|
0
|
502
|
|
POST
|
Sure no problem. Consider this very short sample: Xaml-code:
<Grid x:Name="LayoutRoot" Background="White">
<esri:Map x:Name="MyMap">
<esri:ArcGISTiledMapServiceLayer Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
<esri:FeatureLayer OutFields="*" MouseLeftButtonDown="FeatureLayer_MouseLeftButtonDown
Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0"/>
</esri:Map>
<StackPanel x:Name="myAttributeEditor" VerticalAlignment="Top" HorizontalAlignment="Right" Height="100" Width="100">
<TextBlock x:Name="readOnlyField" Text="{Binding Attributes[type]}"/>
<TextBox x:Name="editableField" Text="{Binding Attributes[description], Mode=TwoWay}"/>
</StackPanel>
</Grid>
Code-behind
private void FeatureLayer_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs e)
{
myAttributeEditor.DataContext = e.Graphic;
}
Notice that every time I select a different feature, the attribute editor changes its value. In this feature service, 'type' is editable but I've restricted editing by making it a TextBlock. The 'description' field is editable too and I've allowed editing by making it a TextBox with Two-Way binding. To improve this you can create your own UserControl instead of just a StackPanel within the same Grid. But same idea, you set its DataContext for the Binding to be resolved. It would not know which Attributes to retrieve unless it knows the Graphic.
... View more
02-11-2011
01:02 PM
|
0
|
0
|
1307
|
|
POST
|
I think you can do make the Storyboard a Resource and change ColorAnimation in code but I don't know if that is a good idea. I have not tried this but I think syntax is correct.
<Storyboard x:Key="Animation">
<ColorAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="(Ellipse.Fill).(SolidColorBrush.Color)"
To="Yellow" Duration="00:00:0.25"/>
</Storyboard>
<!--same code as before for SelectMarkerSymbol except for Selected state-->
<VisualState x:Name="Selected" Storyboard="{StaticResource Animation}">
In code-behind:
Storyboard sb = this.LayoutRoot.Resources["Animation"] as Storyboard;
ColorAnimation colorAnimation = sb.Children[0] as ColorAnimation;
colorAnimation.To = Colors.Red;
Why don't you just create a different Symbol if Selected state requires a different ColorAnimation?
... View more
02-11-2011
12:44 PM
|
0
|
0
|
1570
|
|
POST
|
Instead of using SimpleMarkerSymbols as symbol for your UniqueValueRenderer Infos, you can use StrobeMarkerSymbols. But maybe change the Fill color of the ellipse (marked as static symbol on top in the sample) to differentiate the symbols.
... View more
02-11-2011
08:55 AM
|
0
|
0
|
516
|
|
POST
|
Have you looked at this sample? http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Intersect When the Intersect is completed, you can get the vertices in your geometry. These are your intersection points. I think another way is to do the following (assuming you are working with polygon):
if (first.Geometry.Extent.Intersects(second.Geometry.Extent))
{
PointCollection pc = new PointCollection(); // will contain all intersection points
foreach (var p in (first.Geometry as Polygon).Rings)
{
for (int i = 0; i < p.Count; i++)
if (p.Extent.Intersects(second.Geometry.Extent))
pc.Add(p.Clone());
}
}
The intersection in the above code checks against geometry extent though. So maybe you need to get the polylines formed by the vertices and check intersection against these polyline extent.
... View more
02-11-2011
08:43 AM
|
0
|
0
|
518
|
|
POST
|
I'm not sure what else to tell you. Maybe the numeric value is a double not an integer? You can create a class that implements IRenderer with UniqueValueRenderer (UVR) as one of its properties. Use this renderer for your layer instead so you can debug where it may be failing. You can implement GetSymbol() this way. Step through when it fails to find a matching info.
public Symbol GetSymbol(Graphic graphic)
{
if (graphic != null && UVR.Attribute != null)
{
if (graphic.Attributes.ContainsKey(UVR.Attribute))
{
object objValue = graphic.Attributes[UVR.Attribute];
foreach (UniqueValueInfo info in UVR.Infos)
{
if (info.Value == objValue || objValue != null && info.Value != null && objValue.GetHashCode() == info.Value.GetHashCode())
return info.Symbol;
}
}
}
return UVR.DefaultSymbol;
}
... View more
02-11-2011
08:10 AM
|
0
|
0
|
2262
|
|
POST
|
You can set layer properties and mark individual fields as read-only by following this blog post: http://blogs.esri.com/Dev/blogs/arcgisdesktop/archive/2010/09/07/Preparing-a-map-for-editing_3A00_-Setting-layer-properties.aspx In Morten's example, you will define a control template that binds to your graphic attributes. These binding statements will get resolved once the DataContext of that control is set, which is what the ShowAttributes() method do. You can decide which event will call ShowAttributes(). For example on MouseLeftButtonDown on the layer, you can pass e.Graphic.
... View more
02-11-2011
07:52 AM
|
0
|
0
|
1307
|
|
POST
|
Try to see if the Query ExecuteCompleted event is raised, subscribe to Failed event too if that gets raised instead. If the graphic symbol has IsHitTestVisible=false, none of the mouse events will be raised. Like Dan mentioned, try very simple symbol just to see that the features are present and that they accept mouse events. Then maybe display hard-coded text for now and fix the Binding later just to see if a maptip can be displayed. You can also subscribe to the layer's MouseEnter to check that it is hit when you enter the graphic.
... View more
02-11-2011
07:43 AM
|
0
|
0
|
2279
|
|
POST
|
The service may have reached its limit of how many features it can return at once (the default is 500 for ArcGIS Server 9.3.1, 1000 for ArcGIS Server 10, 1000 for MapIt). Post# 2 on this thread is a good response to your question 🙂 http://forums.arcgis.com/threads/17522-Cannot-add-Layer-with-more-than-500-Features
... View more
02-11-2011
07:37 AM
|
0
|
0
|
1164
|
|
POST
|
Is your service secured with Windows Authentication as described here (http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#//0093000000q4000000.htm)? If so, you can set Credentials property on your layer with your NetworkCredentials. You can verify that your user can be authenticated. If you change your Internet Explorer options to always prompt for username and password and then go the layer URL from your web browser. Login with that specific user credentials, see if that works.
... View more
02-11-2011
07:27 AM
|
0
|
0
|
2272
|
|
POST
|
This line Renderer="MyUniqueValueRenderer" is not correct. Renderer property expects IRenderer not a string, therefore you need to change it to: Renderer="{StaticResource MyUniqueValueRenderer}" This will point to a resource in your dictionary.
... View more
02-10-2011
04:57 PM
|
0
|
0
|
1164
|
|
POST
|
FeatureDataForm marks fields as read-only when the service have marked them read-only. See Fields section in this document: http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#//009300000021000000.htm. While you cannot change the field to read-only, you can hide this read-only field by not including it in your FeatureLayer OutFields. This is a related thread: http://forums.arcgis.com/threads/20521-How-to-set-some-attributes-readonly-for-FeatureDataForm
... View more
02-10-2011
04:52 PM
|
0
|
0
|
1307
|
|
POST
|
Map PropertyChanged event is fired whenever a property of the map changes. In that specific sample, we are only concerned if the property that got changed is its SpatialReference. Dan is correct, when the first layer is added to your map, it should trigger SpatialReference property to change and since we unsubscribe to it after this, it would never be hit again. This is not the event that opens the maptip though. GraphicsLayer MapTip opens when mouse enters a graphic. You can listen to GraphicsLayer MouseEnter event, if you want but opening and closing the MapTip is handled by the API. When you say Map tip does not work.. what do you mean by that exactly? 😛 Map tip does not open or opens without content? Since you modified the services, you must have also updated the Binding statements since the attribute keys here are specific to the services in the sample. Also check that your graphics geometry and a symbol that is appropriate for this geometry type. Check also that if you used a symbol template, none of the elements here have IsHitTestVisible to false.
... View more
02-10-2011
04:46 PM
|
0
|
0
|
2279
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-10-2026 12:13 PM | |
| 1 | 09-11-2025 01:30 PM | |
| 1 | 06-06-2025 10:14 AM | |
| 1 | 03-17-2025 09:47 AM | |
| 1 | 07-24-2024 07:32 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-13-2026
09:07 AM
|