|
POST
|
For Silverlight 4, you need API v2.0 and up. Yeah, check that the project references are correct and that they point to the proper file location. Once you have verified that your project has the proper version and files, maybe you just need to add imports statement: Imports ESRI.ArcGIS.Client
... View more
11-29-2010
01:05 PM
|
0
|
0
|
1398
|
|
POST
|
This is expected when the map's resolution has not been set. Once you add a layer to your map that will define it's resolution (Minimum, Maximum and current), you should be able to see the ZoomSlider.
... View more
11-29-2010
01:00 PM
|
0
|
0
|
3445
|
|
POST
|
They are similar but the To property of the DoubleAnimation is different, for Normal state it is to "0.25", for MouseOver state it is to "0.75" You can either remove this animation so Opacity will stay at 1, or update the animation to a number that is less opaque.
... View more
11-29-2010
12:02 PM
|
0
|
0
|
3445
|
|
POST
|
To get the vertices of a polygon, you need to go through the Rings of the polygon where each Ring is a PointCollection and each collection is composed of MapPoints (vertices). Something like:
PointCollection vertices = new PointCollection();
for (int i = 0; i < polygon.Rings.Count; i++)
foreach (var mp in polygon.Rings)
vertices.Add(mp);
To convert this to a polyline geometry, you need to create a Path for every Ring where each Ring and Path contain the same PointCollection.
... View more
11-29-2010
11:58 AM
|
0
|
0
|
821
|
|
POST
|
I think you will still get compile error because the FeatureLayer property would expect only FeatureLayer type. It is however, possible to create a FeatureLayer from a map service (maybe this is what you were doing). It is true that FeatureDataForm will show read-only fields if the FeatureLayer comes from a map service. You will not be allowed to edit, but you will be allowed to retrieve the feature ID, if this is part of your feature Attributes.
... View more
11-29-2010
11:23 AM
|
0
|
0
|
1398
|
|
POST
|
From the previous posts, I believe the rectangle is a graphic with envelope geometry, created by Draw object and added to a GraphicsLayer. Because if it were the rectangle used for zoom to selection, it would have been removed from the map before the zoom.
... View more
11-29-2010
11:16 AM
|
0
|
0
|
1569
|
|
POST
|
You can change the Navigation control template. Kindly see this blog: http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2010/05/20/Use-control-templates-to-customize-the-look-and-feel-of-ArcGIS-controls.aspx You can see in the default template's VisualStateManager include "Normal" and "MouseOver" states which changes the Opacity of the whole Grid.
... View more
11-29-2010
10:08 AM
|
0
|
0
|
3445
|
|
POST
|
If you are using FeatureDataForm, then you must be using FeatureLayer, because FeatureDataForm need to set its FeatureLayer property in order to display attributes.
... View more
11-29-2010
10:04 AM
|
0
|
0
|
1398
|
|
POST
|
I think that gaining basic knowledge of C# and Silverlight programming are kind of easy to pick up with the availability of tutorial and other online resource. But "easy" is subjective. You can maybe try this out yourself and gauge how you feel about using our API. The API resource center http://esriurl.com/slsdk2 and blogs usually target beginner to intermediate level of programmers.
... View more
11-29-2010
09:58 AM
|
0
|
0
|
1174
|
|
POST
|
What version of the API are you using? There is a known issue in v2.1 and lower that when Map's ZoomDuration is zero, the ConstrainedExtent is not respected. I have not seen graphics disappear though. Can you share us your code? Maybe we can reproduce it here? Thanks.
... View more
11-29-2010
08:41 AM
|
0
|
0
|
2302
|
|
POST
|
Since you already have a map service, can you use FeatureLayer instead? http://help.arcgis.com/en/webapi/silverlight/help/Creating_featurelayer.htm There is a MouseLeftButtonDown you can subscribe to, on the Feature Layer itself, this has GraphicMouseButtonEventArgs and you can easily use e.Graphic to identify the feature that was clicked.
... View more
11-29-2010
07:52 AM
|
0
|
0
|
1791
|
|
POST
|
Oh I see. You are talking about this thread http://forums.arcgis.com/threads/16331-Results-from-IdentifyTask-are-not-correct-(indexed-by-Field-Alias) where IdentifyResults use Alias. This bug has been reported to ArcGIS Server Team. As for your other question, you can use the UserToken parameter of the ExecuteRelationshipQueryAsync to hold the existing graphics. For example:
// more code here
qt.ExecuteRelationshipQueryAsync(rp, incidentsLayer.Graphics);
}
private void qt_ExecuteRelationshipQueryCompleted(object sender, RelationshipEventArgs e)
{
GraphicCollection graphics = e.UserState as GraphicCollection;
// more code here
}
Also, when performing a Query to the Related Table, you don't need to know which field in the table is being matched against the layer's Object ID's. These are the only parameters your application need to know: http://sampleserver3.arcgisonline.com/ArcGIS/SDK/REST/index.html?fsqueryrelated.html
... View more
11-24-2010
01:12 PM
|
0
|
0
|
2446
|
|
POST
|
Jenn, I got yours to work using the code below. It is retrieves the Realted records per individual feature. I was confused because I thought the RelationshipParameter.ObjectIDs was looking for a list of IDs. I was trying to set RelationshipParameter.ObjectIDs = FeatureSet.ObjectIDs but I think there is a conversion issue. Many Thanks, Derald I think your code looks fine already, you did not have to rewrite it to conform to the code I posted earlier. I simply suggested using LayerInfo.ObjectIdField so you don't have to hardcode the key. You are right that the RelationshipParameter takes an enumerable of ObjectIDs. The code snippet I posted was intended for checking against one ID only and therefore not suitable solution for your application if you need to check against multiple ID's - you would have to tweak it a little bit. And I do not see anything wrong in the code you posted (#7)http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.RelationshipParameter~ObjectIds.html
... View more
11-24-2010
11:21 AM
|
0
|
0
|
2446
|
|
POST
|
I tried the following code to check that the ObjectIdField in LayerInfo is the same key used to retrieve the graphic ID. It worked on both Map Service and Feature Service you provided, even if they had an alias, they still use field name as key, not the alias.
public MainPage()
{
InitializeComponent();
FeatureLayer l = new FeatureLayer() { Url = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/MapServer/0" };
l.OutFields.Add("*");
l.Initialized += l_Initialized;
l.Initialize();
}
void l_UpdateCompleted(object sender, EventArgs e)
{
FeatureLayer l = sender as FeatureLayer;
l.UpdateCompleted -= l_UpdateCompleted;
var id = l.LayerInfo.ObjectIdField;
int objId;
foreach (var g in l.Graphics)
objId = Convert.ToInt32(g.Attributes[id]);
}
void l_Initialized(object sender, System.EventArgs e)
{
FeatureLayer l = sender as FeatureLayer;
l.Initialized -= l_Initialized;
l.UpdateCompleted += l_UpdateCompleted;
l.Update();
}
If you need to get the alias of a given field, LayerInfo has Fields property, each field will have these information: http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Field_members.html
string alias;
foreach(var f in l.LayerInfo.Fields)
alias = f.Alias;
Dave, Can you try the code above and see if the "bug/feature :)" exist? I can use ObjectIdField to get the object ID from Attributes. Please let me know how I can reproduce it. Thanks.
... View more
11-24-2010
11:05 AM
|
0
|
0
|
2446
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 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 |
2 weeks ago
|