|
POST
|
Instead of using a DataGrid you can use any ItemsControl. Example with a basic ItemsControl: <ItemsControl x:Name="MyItemsControls">
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Margin="0,0,0,10">
<TextBlock Text="{Binding Feature.Attributes[PID], StringFormat='PID: \{0\}'}" />
<TextBlock Text="{Binding Feature.Attributes[ADDRESS], StringFormat='Address: \{0\}'}" />
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
And you need to bind by code the ItemsSource property of your ItemsControl:
// Bind data grid to find results. Bind to the LastResult property which returns a list
// of FindResult instances. When LastResult is updated, the ItemsSource property on the
// will update.
Binding resultFeaturesBinding = new Binding("LastResult");
resultFeaturesBinding.Source = findTask;
MyItemsControls.SetBinding(ItemsControl.ItemsSourceProperty, resultFeaturesBinding);
Hope this help.
... View more
01-07-2011
12:00 AM
|
0
|
0
|
1857
|
|
POST
|
but still everything what I am seeing after clicking "code behind C#" is just a few lines. Could you, please tell me where I can find the rest of the code? There is no more code for this sample. Most of the work is done by the Editor control which is provided by the SL API.
... View more
01-06-2011
11:11 PM
|
0
|
0
|
2246
|
|
POST
|
In VB (unlike in C#), the rootnamespace and the namespace embedding the classes are cumulative. So if the rootnamespace of your project is 'SilverlightApplication1' (right click on the project --> properties --> look at Rootnamespace) and your classes are surrounded with a 'SilverlightApplication1' namespace, the full path of your class becomes 'SilverlightApplication1.SilverlightApplication1.MyClass. So in XAML you have to see : <UserControl x:Class="SilverlightApplication1.SilverlightApplication1.MainPage" ........ My suggestion would be to remove the Namespace from your class and so to keep <UserControl x:Class="SilverlightApplication1.MainPage" ........
... View more
01-06-2011
10:18 AM
|
0
|
0
|
3740
|
|
POST
|
Thanks Dan, A North Arrow is a good idea (furthermore well oriented:)) I will integrate your enhancement in the next version of the sample.
... View more
01-06-2011
09:51 AM
|
0
|
0
|
1703
|
|
POST
|
P.S.: Where do we get the list of things we can use for Binding? Is Label a property of a layer in a map service? The data context of one item is set to a LayerItemViewModel object (see documentation). You can notice that this object has a 'Layer' property which is the map layer where the legend item is coming from. By using this layer property you can access to any property of the layer. As an example, you can use Layer.ID to get what you want: <esri:Legend.LayerTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<CheckBox IsChecked="{Binding IsEnabled, Mode=TwoWay}"
IsEnabled="{Binding IsInScaleRange}" VerticalAlignment="Center">
<CheckBox.Content>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Layer.ID, StringFormat='\{0\} / '}" />
<TextBlock Text="{Binding Label}" />
</StackPanel>
</CheckBox.Content>
</CheckBox>
</StackPanel>
</DataTemplate>
</esri:Legend.LayerTemplate>
... View more
01-06-2011
09:31 AM
|
0
|
0
|
885
|
|
POST
|
Try to use fiddler to see the requests sent to the server. This could give a clue. Probably one request is not working. From my tests, some requests are no more working when the image size is greater than 2048: For example: http://services.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_MedianIncome_US_2D/MapServer/export?size=2200%2C1000&f=image But the same request is working with image size < 2048: http://services.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_MedianIncome_US_2D/MapServer/export?size=2000%2C1000&f=image On another hand, if the service is not cached, the request looks working even when image size is greater than 2048. For example: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/export?size=2200%2C1000&f=image
... View more
01-06-2011
08:45 AM
|
0
|
0
|
2040
|
|
POST
|
I did some tests and it looks like the possibility to display ArcGISDynamicMapService images bigger than 2048x2048 is only working if the service is not cached (no tiles). At this time, I don't know if it's a bug or a normal behavior. Is your service cached?
... View more
01-06-2011
08:07 AM
|
0
|
0
|
2040
|
|
POST
|
For what I know of the functionalities you are proposing, you don't need ArcSDE. As Mortem mentionned, check that your SHAPE field is visible in the mxd you have used to publish your service (in ArcMap, right click the feature layer--> Fields Tab-> check visibility of SHAPE field).
... View more
01-06-2011
07:58 AM
|
0
|
0
|
1821
|
|
POST
|
Just to clarify...are saying that I can do all of these things in a silverlight map feature layer without the need to have feature access available in the service? Right, Feature access is only needed for editinf not for viewing. The table I'm using doesn't have a shape field...I'm assuming that I'll need to add one. Is that correct? On the other hand, if I create a dynamic layer and point toward the same service, the points show up. Strange that your dynamic map service is able to show up your features if there is no SHAPE field. The SHAPE field is containing the geometry and is needed if you want to be able to display your feature on the map.
... View more
01-06-2011
07:01 AM
|
0
|
0
|
1821
|
|
POST
|
You are right, it's returning 'Pixel'. So it looks like the layer name info is not available. A workaround might be to add it in the delegate hooked up to ExecuteComplete event:
identifyTask.ExecuteCompleted += (s,e) => IdentifyTask_ExecuteCompleted(s, e, "MyImageLayerID");
.........
private void IdentifyTask_ExecuteCompleted(object sender, ImageServiceIdentifyEventArgs args, string layerID)
{
......
... View more
01-06-2011
06:51 AM
|
0
|
0
|
837
|
|
POST
|
Sorry I gave you the code for 'Identify' instead 'Query'. Query version: query.ReturnGeometry = true;
query.OutSpatialReference = MyMap.SpatialReference;
... View more
01-06-2011
06:16 AM
|
0
|
0
|
1016
|
|
POST
|
Dan, You are right, there is a bug. To fix it, line 424 of MapPrinter.cs, move the initialization of _oldMap inside the test Map!=null: if (Map != null)
{
_oldMap = Map;
Map = null;
}
ResetDefineExtent();
I will update the sample ASAP (I guess I should even revisit this badly designed part of the sample)
... View more
01-06-2011
06:02 AM
|
0
|
0
|
1703
|
|
POST
|
You have just to initialize the spatialreference of your identify parameters to the spatial reference of your map. Something like: identifyParams.SpatialReference = MyMap.SpatialReference
... View more
01-06-2011
05:27 AM
|
0
|
0
|
2437
|
|
POST
|
With Silverlight there is no exact equivalency to the JavaScript TileUtils class, but you can use the TileInfo property of the ArcGISTiledMapServiceLayer : http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.TiledLayer~TileInfo.html By using the array of Lods, the Width, the Height and the Origin, you should be able to do what you want but probably not that easy than with TileUtils class.
... View more
01-06-2011
05:21 AM
|
0
|
0
|
1155
|
|
POST
|
The ImageServiceIdentifyResult class has a 'Name' property. For example with this image service, the Name property is returning 'PreAerial2001'. Is it what you are looking for?
... View more
01-06-2011
12:41 AM
|
0
|
0
|
837
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-12-2025 03:01 AM | |
| 1 | 10-14-2025 09:24 AM | |
| 1 | 06-13-2013 09:22 AM | |
| 1 | 04-29-2022 02:21 AM | |
| 1 | 04-29-2022 02:28 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-30-2025
08:06 AM
|