|
POST
|
Instead of using SimpleMarkerSymbol in your SimpleRenderer, you can use symbols that define their template as in this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SelectGraphics. Notice how the template has VisualStates defined for Selected.
... View more
02-15-2011
08:49 AM
|
0
|
0
|
974
|
|
POST
|
The following XAML-code
<esri:FeatureLayer ID="MyFeatureLayer"
Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0"
Where="POP1990 > 100000" />
is equivalent to:
double number = 100000;
FeatureLayer l = new FeatureLayer()
{
ID = "MyFeatureLayer",
Url = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0",
Where = string.Format("POP1990 > {0}", number)
};
MyMap.Layers.Add(l);
You can use string.Format() with a number argument.
... View more
02-15-2011
08:45 AM
|
0
|
0
|
830
|
|
POST
|
It's hard to tell where the problem could be without knowing how the ClassBreaksRenderer was created. It might be that the Attribute of ClassBreaksRenderer does not match an OutField in your FeatureLayer or the symbol does not match the geometry type of the layer. http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureLayerRendering The equivalent code-behind of the XAML in this sample is as follows:
private void FeatureLayer_Initialized(object sender, System.EventArgs e)
{
FeatureLayer layer = sender as FeatureLayer;
ClassBreaksRenderer classBreaksRenderer = new ClassBreaksRenderer()
{
Attribute = "POP07_SQMI"
};
classBreaksRenderer.Classes.Add(
new ClassBreakInfo()
{
MinimumValue = 0d,
MaximumValue = 50d,
Symbol = this.LayoutRoot.Resources["LowFillSymbol"] as Symbol
}
);
classBreaksRenderer.Classes.Add(
new ClassBreakInfo()
{
MinimumValue = 50d,
MaximumValue = 200d,
Symbol = this.LayoutRoot.Resources["MediumFillSymbol"] as Symbol
}
);
classBreaksRenderer.Classes.Add(
new ClassBreakInfo()
{
MinimumValue = 200d,
MaximumValue = 5000d,
Symbol = this.LayoutRoot.Resources["HighFillSymbol"] as Symbol
}
);
layer.Renderer = classBreaksRenderer;
}
... View more
02-15-2011
08:39 AM
|
0
|
0
|
1170
|
|
POST
|
The Client API's does not have direct support for working with Shapefiles. Some developers share their code in this forum though. This is related thread: http://forums.arcgis.com/threads/598-Beta-10-Shape-Files-and-FGB I think that the best way is to publish your data to ArcGIS Server so you can take advantage of both the Server and Client API's. Start with our Concepts page http://help.arcgis.com/en/webapi/silverlight/help/index.html#//016600000006000000.htm and samples: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm
... View more
02-15-2011
08:14 AM
|
0
|
0
|
493
|
|
POST
|
Can you try to run Fiddler with your application to monitor web requests? I really could not replicate the issue you are facing with OverviewMap. I modified a copy of this sample in WPF http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#OverviewMap. . Placing OverviewMap code in another Window with the code I included in my last post. Did you replace "OtherWindow" with your own class name? public static readonly DependencyProperty MapProperty = DependencyProperty.Register("Map", typeof(Map), typeof( OtherWindow), new PropertyMetadata(OnMapPropertyChanged)); public static readonly DependencyProperty LayerProperty = DependencyProperty.Register("Layer", typeof(Layer), typeof( OtherWindow), new PropertyMetadata(OnLayerPropertyChanged)); If that still does not work for you, download Toolkit source code from CodePlex http://esrisilverlight.codeplex.com/ and debug through it.
... View more
02-15-2011
07:57 AM
|
0
|
0
|
1977
|
|
POST
|
Please try to run Fiddler and inspect the web requests. http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2009/08/24/Troubleshooting-blank-layers.aspx. I suspect that you just need to supply the NetworkCredentials for the layer that uses secured service. Something like this or maybe create a class that will get/set Credentials from a UserControl so that you don't hardcode your credentials.
xmlns:net="clr-namespace:System.Net;assembly=System">
<Window.Resources>
<net:NetworkCredential x:Key="MyCredentials" UserName="myUserName" Password="myPassword" Domain="myDomain"/>
</Window.Resources>
<esri:Map x:Name="MyMap">
<esri:ArcGISTiledMapServiceLayer Url="mySecuredServiceURL" Credentials="{StaticResource MyCredentials}" InitializationFailed="Layer_InitializationFailed" Initialized="Layer_Initialized"/>
</esri:Map>
... View more
02-15-2011
07:47 AM
|
0
|
0
|
2275
|
|
POST
|
You can create your own renderer by implementing IRenderer. You will be required to define GetSymbol() method. At this time, you will have access to the graphic attributes and decide programmatically which symbol to use.
... View more
02-15-2011
07:39 AM
|
0
|
0
|
1452
|
|
POST
|
You can use FeatureLayer with filtering (update Where clause) as in this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureLayerFiltering. You can also use ClassBreaksRenderer as in this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureLayerRendering. You can write your own renderer too, you just need to implement IRenderer, specifically GetSymbol() method. http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.IRenderer.html More on Symbols and Renderers: http://help.arcgis.com/en/webapi/silverlight/help/index.html#/Working_with_Symbols_and_Renderers/01660000000w000000/ And yes you are correct, support for Table is new in ArcGIS Server 10 as described here: http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/layer.html
... View more
02-15-2011
07:33 AM
|
0
|
0
|
569
|
|
POST
|
As per the documentation, the value would be between 0 and 100.So, does it mean, when value is 100, all layers are fully initialized and images for the map is ready to be displayed and I should disable my progress bar. Yes, this is correct. It is the same event ProgressBar from the Toolkit is using: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#MapProgressBar. But since this control is not modal as you need in your application, you can simply listen for the same event. The source code for the Toolkit is also available in CodePlex, should you need to download and see how it works: http://esrisilverlight.codeplex.com/
... View more
02-15-2011
07:22 AM
|
0
|
0
|
1084
|
|
POST
|
Oh okay. I tried the reverse where OutFields was initially "*" and then I changed OutFields to a subset of fields before setting MyFeatureDataForm.FeatureLayer. The workaround worked for this case. For your case, you can do the following. Update() the layer once you have determined that the user is Admin and set FeatureLayer property on UpdateCompleted.
void featureLayer_UpdateCompleted(object sender, System.EventArgs e)
{
FeatureLayer featureLayer = sender as FeatureLayer;
MyFeatureDataForm.FeatureLayer = featureLayer;
}
//Do after login when user is determined to be Admin user.
private void Button_Click(object sender, RoutedEventArgs e)
{
FeatureLayer featureLayer = MyMap.Layers["PointLayer"] as FeatureLayer;
featureLayer.OutFields = new OutFields() { "*" };
featureLayer.UpdateCompleted += new System.EventHandler(featureLayer_UpdateCompleted);
featureLayer.Update();
}
... View more
02-14-2011
01:56 PM
|
0
|
0
|
2429
|
|
POST
|
Sure you can modify the template of NavigationControl and add your own button. http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2010/05/20/Use-control-templates-to-customize-the-look-and-feel-of-ArcGIS-controls.aspx. It simply calls "Map.ZoomTo(Map.Layers.GetFullExtent())". Toolkit is also available in CodePlex: http://esrisilverlight.codeplex.com/
... View more
02-14-2011
01:34 PM
|
0
|
0
|
492
|
|
POST
|
You can go through the API's Library Reference http://help.arcgis.com/en/webapi/silverlight/apiref/webtoc.html# and go through the samples. I'll ask around if we have other online documentation that can help you see order of events or general workflow.
... View more
02-14-2011
01:23 PM
|
0
|
0
|
772
|
|
POST
|
Thank you for sharing us this use case. We are considering on accommodating it in future versions of our API. Currently, FeatureDataForm does not update its layout when layer OutFields parameter changes. Current workaround is to set the FeatureLayer OutFields before setting FeatureDataForm's FeatureLayer property.
featureLayer.OutFields = new OutFields() { "address" }; //update to OutFields ("*" or subset of fields)
MyFeatureDataForm.FeatureLayer = featureLayer;
... View more
02-14-2011
01:12 PM
|
0
|
0
|
2429
|
|
POST
|
I tested the following code in C# and converted to VB. This demonstrates how you can take advantage of Linq Group, Sum and Lambda expressions or Anonymous functions.
Dim graphicCollection As New GraphicCollection()
Dim graphic As New Graphic()
graphic.Attributes("Officer") = "c"
graphic.Attributes("Incident") = 1
graphicCollection.Add(graphic)
graphic = New Graphic()
graphic.Attributes("Officer") = "b"
graphic.Attributes("Incident") = 1
graphicCollection.Add(graphic)
graphic = New Graphic()
graphic.Attributes("Officer") = "a"
graphic.Attributes("Incident") = 1
graphicCollection.Add(graphic)
graphic = New Graphic()
graphic.Attributes("Officer") = "c"
graphic.Attributes("Incident") = 1
graphicCollection.Add(graphic)
graphic = New Graphic()
graphic.Attributes("Officer") = "a"
graphic.Attributes("Incident") = 1
graphicCollection.Add(graphic)
Dim results = From g In graphicCollection _
Group g By DirectCast(g.Attributes("Officer"), String) Into r _
Select Officer = r.Key, Incidents = r.Sum(Function(i) CInt(i.Attributes("Incident")))
For Each item As var In results
MessageBox.Show(String.Format("Officer {0} has {1}", item.Officer, item.Incidents))
Next
This will first create groups by Officer and then total the number of Incidents within each group. I suggest you play with very simple data first such as the one above to get a feel of which Linq operation (if any) would give you the desired result. If Incident becomes a string, then you can no longer use Sum.
... View more
02-14-2011
12:47 PM
|
0
|
0
|
2093
|
|
POST
|
I think you can perform the check if user is Admin early on and set OutFields to all or select fields.
FeatureLayer l = new FeatureLayer()
{
Url = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/MapServer/0"
};
if (user is Admin) //TODO: check if user is Admin
l.OutFields = new OutFields() { "*" };
else
l.OutFields = new OutFields() { "incident_number", "description" };
MyMap.Layers.Add(l);
... View more
02-14-2011
10:58 AM
|
0
|
0
|
2429
|
| 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
|