|
POST
|
Yeah you can use any control that you wish to use. I just suggested ComboBox because you wanted a drop down menu. Try it the way you wanted it first. Go through tutorials too.
... View more
11-02-2010
07:14 AM
|
0
|
0
|
815
|
|
POST
|
Here's a blog on how you can customize the look and feel of ArcGIS controls 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's similar steps except you choose FeatureDataForm
... View more
11-02-2010
07:04 AM
|
0
|
0
|
1461
|
|
POST
|
I checked the attached solution and it works for me, the buttons are not disabled. The code is identical from the SDK sample because that is what you were trying to follow, right? The only difference is they reside in different UserControls but the Map DependencyProperty should work.
... View more
11-02-2010
06:58 AM
|
0
|
0
|
1207
|
|
POST
|
Have you used string.Format()? Here's some documentation on how it is used. http://msdn.microsoft.com/en-us/library/system.string.format(v=VS.100).aspx You can update the Where to the following code:
int min = 32, max = 33;
query.Where = string.Format("STATE_ABBR = '{0}' and MED_AGE < {1}and MED_AGE_M > {2}", QueryComboBox.SelectedItem, min, max);
The best way to test if you are constructing a good SQL Where clause is to try it out on the browser first, by clicking on "Query Layer" link underneath the layer URL.
... View more
11-01-2010
04:40 PM
|
0
|
0
|
2706
|
|
POST
|
I think there is a confusion between VisibleLayers as defined on the client http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer~VisibleLayers.html and VisibleLayers as defined on the server. Please note that the LayerOption in the IdentifyParameters http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.IdentifyParameters~LayerOption.html, talks about the VisibleLayers as defined on the server - at the given map extent. You can try out this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Identify If you click on say Los Angeles, the result comes from Course Counties layer. If you zoom in further but click around the same point in Los Angeles, the result then comes from Cencus Block Group, which was not visible earlier at the initial map extent. I suspect that what you're doing currently is assign the same MapService to a ArcGISDynamicMapServiceLayer and turn off some layers by setting VisibleLayers. This does not affect the IdentifyTask as you can see they only work with the same URL.
... View more
11-01-2010
02:23 PM
|
0
|
0
|
424
|
|
POST
|
Looking at how the Query is formed, it uses Text property which checks against the layer's DisplayField http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.Query~Text.html In the given layer, DisplayField is STATE_NAME, therefore the query with STATE_ABBR does not return any results. http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5 I will update Where property instead of Text property in the SelectionChanged event handler. http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.Query~Where.html
query.Where = string.Format("STATE_ABBR = '{0}'", QueryComboBox.SelectedItem);
... View more
11-01-2010
01:51 PM
|
1
|
0
|
2706
|
|
POST
|
Instead of using Image as ComboBox items, try to replacing them with <TextBlock Text="test"/> for now. If you see this text "test" twice but was unable to see the images earlier, then your Uri may be incorrect or those images may not be added correctly to your project.
... View more
11-01-2010
01:25 PM
|
0
|
0
|
1821
|
|
POST
|
Graphics is also a property of GraphicsLayer. If later you will not need to distinguish between your different sources you can perform query on all three sources Where "1=1" to return all features and OutFields="*" to return all fields, and add then the featureset.Features to a single GraphicsLayer. You can then bind your ItemSource to the Graphics property of this specific GraphicsLayer. If you will use separate FeatureLayers, then yes you will need another element that will hold a list of the FeatureLayers. You also need to update the element binding in the ComboBox ItemSource, since it will be based on the SelectedItem.
... View more
11-01-2010
01:06 PM
|
0
|
0
|
584
|
|
POST
|
Do you mean create the PictureMarkerSymbol in code-behind or simply access from XAML resource as in this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AddGraphics These two are equivalent code:
<esri:PictureMarkerSymbol x:Key="GlobePictureSymbol" OffsetX="8" OffsetY="8"
Source="/Assets/images/globe-16x16.png" />
PictureMarkerSymbol pms = new PictureMarkerSymbol()
{
OffsetX = 8,
OffsetY = 8,
Source = new BitmapImage(new Uri("/Assets/images/globe-16x16.png", UriKind.RelativeOrAbsolute))
};
... View more
11-01-2010
12:58 PM
|
0
|
0
|
337
|
|
POST
|
Oh I see what the problem is now. In this sample http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AttributeQuery (if you are using this), the query OutFields only include "STATE_NAME". The service that it's using is http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5 and "STATE_ABBR", while it is a valid field, is not included in the OutFields. You can update this line
query.OutFields.AddRange(new string[] { "STATE_NAME", "STATE_ABBR" });
//or simply use * to return all fields -- query.OutFields.Add("*");
... View more
11-01-2010
12:50 PM
|
0
|
0
|
2706
|
|
POST
|
If the shape needed to be simplified, wouldn't the program fall into my Failed event? Not necessarily, sometimes you can get incorrect values because the input was incorrect. But here's how you can create your own Geometry Service: http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_java_help/index.html#/Geometry_services/009200000023000000/
... View more
11-01-2010
12:41 PM
|
0
|
0
|
970
|
|
POST
|
In this code snippet MyMap is the name of my map, Area is the ID of my FeatureLayer of interest. What you display in the DataTemplate is up to you, in this case, I am displaying one of the attributes where field name is symbolname. The highlighted text in red is what you might need.
<ComboBox ItemsSource="{Binding ElementName=MyMap, Path=Layers[Area].Graphics}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Attributes[symbolname]}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
... View more
11-01-2010
11:29 AM
|
0
|
0
|
584
|
|
POST
|
It is a foreach loop.
foreach (Graphic item in layer.Graphics)
item.Selected = false;
You can also use the Editor's ClearSelection command as in this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureLayerSelection
... View more
11-01-2010
11:18 AM
|
0
|
0
|
1996
|
|
POST
|
When you say "it breaks", what error message do you see? Have you tried to use Fiddler to see where it possibly fails?
... View more
11-01-2010
11:01 AM
|
0
|
0
|
2706
|
|
POST
|
You can iterate through the layers' Graphics and mark every selected graphic (Selected = false). You can subscribe to PropertyChanged event on all FeatureLayers. The property you need to check for is either "SelectedGraphics" or "SelectionCount". When either of these two property changes, you can check whether this is the layer you want the graphic to be selected, if not then be sure to unselect the graphic.
... View more
11-01-2010
10:58 AM
|
0
|
0
|
1996
|
| Title | Kudos | Posted |
|---|---|---|
| 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 | |
| 1 | 04-05-2024 06:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-12-2026
09:38 AM
|