|
POST
|
You can look at the following SDK sample http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AddGraphicsXAML and download the Interactive SDK http://help.arcgis.com/en/webapi/wpf/samples/start.htm to see WPF version. I copied the following XAML from that sample. This map control has 2 layers: base layer and GraphicsLayer that contain a given map point.
<esri:Map x:Name="MyMap" WrapAround="True" Background="White">
<esri:ArcGISTiledMapServiceLayer ID="PhysicalTiledLayer"
Url="http://services.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer"/>
<esri:GraphicsLayer ID="MyGraphics" >
<esri:GraphicsLayer.Graphics >
<esri:Graphic Symbol="{StaticResource RedMarkerSymbol}" >
<esri:MapPoint X="-140.9" Y="63.391" />
</esri:Graphic>
</esri:GraphicsLayer.Graphics>
</esri:GraphicsLayer>
</esri:Map>
... View more
01-03-2012
10:59 AM
|
0
|
0
|
688
|
|
POST
|
GraphicsLayer has a MouseLeftButtonDown event. When you mouse down on a graphic, this event will fire and you can access it using e.Graphic.
... View more
01-03-2012
10:52 AM
|
0
|
0
|
1144
|
|
POST
|
I assume you have similar code. You can call layer.Refresh() on EditCompleted to cause the graphics to re-draw.
private void EditGeometry_GeometryEdit(object sender, EditGeometry.GeometryEditEventArgs e)
{
if (e.Action == EditGeometry.Action.VextedMoved)
{
editGeometry.StopEdit();
editGeometry.StartEdit(editGraphic);
}
else if(e.Action == EditGeometry.Action.EditCompleted)
layer.Refresh();
}
... View more
01-03-2012
10:45 AM
|
0
|
0
|
628
|
|
POST
|
IdentifyTask use Alias but you can use Linq query to find the Field.Name. If you are using 2.3 and up, you can use GetDetails/GetAllDetails to get to the FeatureLayerInfo. GetDet http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer~GetAllDetails.html
l.GetDetails(layerId,
(a, b) =>
{
var field = a.Fields.FirstOrDefault(f => f.Alias == alias);
}
);
where l is ArcGISDynamicMapServiceLayer that points to the same MapServer as your IdentifyTask and alias is from IdentifyTask.
... View more
01-03-2012
10:15 AM
|
0
|
0
|
519
|
|
POST
|
FindResult contain the following information: http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.FindResult_members.html You can use FindTask along with IdentifyTask to show more information about each feature. Please refer to the following SDK samples: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Find http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Identify
... View more
01-03-2012
09:58 AM
|
0
|
0
|
500
|
|
POST
|
Are you using ArcGIS for SharePoint? http://forums.arcgis.com/forums/69-ArcGIS-for-Sharepoint
... View more
01-03-2012
09:50 AM
|
0
|
0
|
661
|
|
POST
|
Did you download the SDK sample? http://help.arcgis.com/en/webapi/silverlight/help/index.html#/Sample_Interactive_SDK/01660000000v000000/ Or are you copy-pasting code to a new silverlight app? Does it compile? If your app runs just as the live sample but does not work when replaced with your service, you can refer to this blog post for trouble shooting blank layers: http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2009/08/24/Troubleshooting-blank-layers.aspx.
... View more
01-03-2012
09:46 AM
|
0
|
0
|
894
|
|
POST
|
Thank you for your feedback. We are working on our documentation. You can find WMS properties here: http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client.Toolkit.DataSources~ESRI.ArcGIS.Client.Toolkit.DataSources.WmsLayer_properties.html. Some properties (as you found) are optional.
... View more
01-03-2012
09:35 AM
|
0
|
0
|
2837
|
|
POST
|
Have you looked at this SDK sample? http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsExplicitSave Editor is interactive. The Add command allows you to draw the geometry and give it default prototype attributes. Your code-snippet indicate that you are not using Editor.Add at all. I'm also not sure if FeatureLayer has already been initialized and updated before you add your graphic. Are you setting both geometry and attributes? You can subscribe to FeatureLayer.EndSaveEdits and SaveEditsFailed events to see error messages if any. You can run Fiddler to see what edit is being committed when you call SaveEdits().
... View more
01-03-2012
09:30 AM
|
0
|
0
|
2378
|
|
POST
|
FeatureDataForm is in read-only mode because the FeatureLayer is also read-only (Url points to MapServer).
... View more
01-03-2012
09:14 AM
|
0
|
0
|
772
|
|
POST
|
I apologize that you were not getting a reply. I just responded to: http://forums.arcgis.com/threads/46679-NullReferenceException-when-using-EditGeometry
... View more
01-03-2012
09:08 AM
|
0
|
0
|
535
|
|
POST
|
I am unable to reproduce this using the SDK sample for EditGeometry. Can you provide steps to reproduce? Does this happen after moving a vertex or moving the geometry? Are you using scale and rotate? CancelEdit may be called when the API detects original geometry has changed. Are you modifying this geometry outside EditGeometry? (i.e. adding/removing vertex in code-behind). Can you share the stack trace as well? Thanks.
... View more
01-03-2012
08:46 AM
|
0
|
0
|
2088
|
|
POST
|
You can look at the following SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#UsingPointDataSource
... View more
12-20-2011
12:39 PM
|
0
|
0
|
516
|
|
POST
|
You can modify the following SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ToolkitFeatureDataGrid If your ComboBox contains the query string, you can translate this to Linq query and set FeatureDataGrid.FilterSource property. Add in the XAML:
<ComboBox x:Name="Filter" SelectionChanged="Filter_SelectionChanged" VerticalAlignment="Top" HorizontalAlignment="Center">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
Add in Code-behind ( be sure you have using System.Linq; 😞
//After InitializeComponent
Filter.ItemsSource = new string[]
{
"1 = 1",
"status = 1",
"req_type = 'Graffiti Complaint - Public Property'",
"status = 1 and req_type = 'Graffiti Complaint - Public Property'"
};
private void Filter_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var query = Filter.SelectedItem as string;
var l = MyMap.Layers["IncidentsLayer"] as FeatureLayer;
if(query == "1 = 1")
MyDataGrid.FilterSource = null;
else if (query == "status = 1")
{
MyDataGrid.FilterSource = (from g in l.Graphics
where (Int16)g.Attributes["status"] == 1
select g).ToList();
}
else if (query == "req_type = 'Graffiti Complaint - Public Property'")
{
MyDataGrid.FilterSource = (from g in l.Graphics
where (string)g.Attributes["req_type"] == "Graffiti Complaint - Public Property"
select g).ToList();
}
else if (query == "status = 1 and req_type = 'Graffiti Complaint - Public Property'")
{
MyDataGrid.FilterSource = (from g in l.Graphics
where (Int16)g.Attributes["status"] == 1 && (string)g.Attributes["req_type"] == "Graffiti Complaint - Public Property"
select g).ToList();
}
}
... View more
12-20-2011
10:07 AM
|
0
|
0
|
1347
|
|
POST
|
It is by design that the graphics created by MeasureAction are removed from the map upon completion. However, this related thread might help preserve the graphics on the map: http://forums.arcgis.com/threads/13902-about-after-using-measure-behavior-the-graph-can-t-stay-in-the-map
... View more
12-20-2011
09:43 AM
|
0
|
0
|
1095
|
| 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
|