|
POST
|
Code sample giving the attached result:
<Grid x:Name="LayoutRoot">
<esri:Map x:Name="MyMap">
<esri:ArcGISTiledMapServiceLayer ID="BaseLayer" Visible="True"
Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
<esri:FeatureLayer ID="MyGraphicsLayer" Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/2"
Mode="OnDemand" OutFields="*" OnDemandCacheSize="5" />
</esri:Map>
<esri:FeatureDataGrid Grid.Row="2" x:Name="MyDataGrid" Height="180" VerticalAlignment="Bottom" Map="{Binding ElementName=MyMap}"
GraphicsLayer="{Binding ElementName=MyMap, Path=Layers.[MyGraphicsLayer]}" />
<charting:Chart Name="myChart" Title="Population" Height="300" Width="400" HorizontalAlignment="Left" VerticalAlignment="Top" Background="{StaticResource CommonBackgroundBrush}">
<charting:ColumnSeries Title="Population 1990" ItemsSource="{Binding ElementName=MyMap, Path=Layers[MyGraphicsLayer].Graphics}"
DependentValuePath="Attributes[POP1990]" IndependentValuePath="Attributes[STATE_NAME]"
IsSelectionEnabled="True" SelectionChanged="ColumnSeries_SelectionChanged"/>
<charting:ColumnSeries Title="Population 1999" ItemsSource="{Binding ElementName=MyMap, Path=Layers[MyGraphicsLayer].Graphics}"
DependentValuePath="Attributes[POP1999]" IndependentValuePath="Attributes[STATE_NAME]"
SelectedItem="{Binding ElementName=MyMap, Path=Layers[MyGraphicsLayer].SelectedGraphics[0]}" />
<charting:Chart.Axes>
<charting:CategoryAxis Orientation="X" SortOrder="Ascending">
<charting:CategoryAxis.AxisLabelStyle>
<!-- Text Vertical -->
<Style TargetType="charting:AxisLabel">
<Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
<Setter Property="RenderTransform">
<Setter.Value>
<RotateTransform Angle="-90"/>
</Setter.Value>
</Setter>
</Style>
</charting:CategoryAxis.AxisLabelStyle>
</charting:CategoryAxis>
</charting:Chart.Axes>
</charting:Chart>
</Grid>
For one series the synchronization with the first selected graphic is done by xaml ( SelectedItem="{Binding ElementName=MyMap, Path=Layers[MyGraphicsLayer].SelectedGraphics[0]}" ), for the other series, the synchronization is done by code (from chart to graphic selection):
private void ColumnSeries_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
Graphic g = (sender as ColumnSeries).SelectedItem as Graphic;
if (g != null)
g.Selected = true;
}
... View more
11-17-2010
12:41 AM
|
0
|
0
|
675
|
|
POST
|
<esri:ArcGISDynamicMapServiceLayer x:Uid="dynMapSvcId" ID="BigMap" Url="" />
My understanding is that you know the url of your map service, so it should be:
<esri:ArcGISDynamicMapServiceLayer x:Uid="dynMapSvcId" ID="BigMap" Url="http://<server>/ArcGIS/rest/services/<mapService>" />
then you can add an Initialized event handler:
<esri:ArcGISDynamicMapServiceLayer x:Uid="dynMapSvcId" ID="BigMap" Url="http://<server>/ArcGIS/rest/services/<mapService>"
Initialized="BigMap_Initialized" />
and in the event handler you can use the LayerInfo array to define which layerID you want to work with and make your query. Note that instead of using a graphicslayer and a query, you could use a feature layer which is basically doing that without any code from you. You just have to initialize the Url of the feature layer which is also something like http://<server>/ArcGIS/rest/services/<mapService>/LayerID
... View more
11-16-2010
07:28 AM
|
0
|
0
|
1218
|
|
POST
|
You can't save a polygon geometry in an ArcGIS server polyline feature class. So, the only way is you to transform the polygon to the polyline at the client side. I don't know if there is a sample somewhere, but I guess this is doable (using Paths and Rings properties of the geometry).
... View more
11-16-2010
05:38 AM
|
0
|
0
|
640
|
|
POST
|
I do have ArcGISDynamicMapService in my map, but at this point, I have not run the query to get the map layers yet. My code is run after the wpf map page is loaded (it is inside the xx_loaded method). Map.Layers will be null. Hope I'm clear now. I don't understand why Map.layers is null if you do have an ArcGISDynamicMapService inside it. You should at least have this layer in Map.Layers? That being said, this will not help you because at this moment the layer is not yet initialized so the sublayers are not yet known. You could put your code in the 'Initialized' event of the layer. At this moment, the LayerInfo array will be initialized.
... View more
11-16-2010
05:32 AM
|
0
|
0
|
2628
|
|
POST
|
From my tests it's only a design issue. All is working well in run time. Seems that replacing '(UIElement.RenderTransform)' by 'RenderTransform' fixes the design issue (and still working in run time :)). But don't ask me why :confused:
... View more
11-16-2010
03:59 AM
|
0
|
0
|
1687
|
|
POST
|
One option is you to include an ArcGISDynamicMapService in your map. Then, the 'Layers' property of this ArcGISDynamicMapService is giving you an array with the layer IDs, names, ... If you don't want to include such a layer in your map, you can request yourself the mapserver endpoint and deserialize the result. Example of mapserver url : http://services.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Median_Age/MapServer?f=pjson
... View more
11-16-2010
03:55 AM
|
0
|
0
|
2628
|
|
POST
|
This bug was existing in the beta but is supposed to be fixed in the release candidate (build 427). Which version are you using? If it's not the RC, could you try after downloading it here : http://resources.arcgis.com/content/how-download-arcgis-api-microsoft-silverlightwpf-beta Thanks
... View more
11-16-2010
12:03 AM
|
0
|
0
|
1399
|
|
POST
|
I didn't reproduce your issue. I tested your code and got the attached result. Could you give more info on how to reproduce it? (browser, OS, ....) Note also that with Fiddler, I can see this request to arcgis.com legend end point: http://www.arcgis.com/sharing/tools/legend?soapUrl=http://map.floridadisaster.org/GIS/rest/services/Facilities/Critical_Facilities/MapServer&f=json&returnbytes=true&_ts=634254971942781074 Do you see it?
... View more
11-15-2010
11:39 PM
|
0
|
0
|
1346
|
|
POST
|
Dave is quite right. Your service don't need to be hosted by ArcGIS.com. It just need to be accessible publically, and so by the arcgis.com web site.
... View more
11-15-2010
11:29 PM
|
0
|
0
|
857
|
|
POST
|
Is your application WPF or Silverlight? The XLMWriter class is depending on this. With Silverlight, you can't create an XMLWriter writing to a file. So your code should be OK with WPF but not with Silverlight:
string xmlfile = @"layer1_xml.xml";
using (XmlWriter writer = XmlWriter.Create(xmlfile, settings ))
With SL, you need a stream as argument. Something like:
string dataFile = @"graphics.xml";
using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication())
{
using (IsolatedStorageFileStream fileStream = store.CreateFile(dataFile))
{
using (XmlWriter writer = XmlWriter.Create(fileStream, new XmlWriterSettings() { Indent = true }))
{
graphicsLayer.SerializeGraphics(writer);
writer.Close();
}
fileStream.Close();
}�??
... View more
11-15-2010
11:25 PM
|
0
|
0
|
1080
|
|
POST
|
One possible option is you to use an XML format to store graphics. You will find sample code to serialize/deserialize graphics here: http://forums.arcgis.com/threads/8774-save-layer-to-xml-file
... View more
11-11-2010
12:10 PM
|
0
|
0
|
1567
|
|
POST
|
For an ArcGISDynamicMapService layer, the legend symbols are coming from the renderers defined in ArcMap (either by the new 10SP1 legend service or by the arcgis.com legend service). So, the legend in the web client is supposed to be very close of the symbols you see in the ArcMap TOC. If, for any reason, you want to get the images in your client application, you can access to the legend items tree by using, as starting point, the 'LayerItems' property of the legend control. From a layerItem, you can access the collection of LegendItems which gives you the ImageSource (and the Label) of the legend item.
... View more
11-11-2010
04:26 AM
|
0
|
0
|
1346
|
|
POST
|
I am not sure you will get many answers in this forum which is dedicated to the web client SL/WPF API. Your issue looks more as an ArcObject/3DAnalyst issue. I suggest you post your question in the ArcObjects forum (http://forums.arcgis.com/forums/20-ArcObjects-All-Development-Languages) or in the 3DAnalyst forum (http://forums.arcgis.com/forums/97-3D-Analyst)
... View more
11-11-2010
04:12 AM
|
0
|
0
|
544
|
|
POST
|
Could you give more infos on how to reproduce this crash? Does it look ramdom or does it happen each time after a specific sequence of actions?
... View more
11-10-2010
05:24 AM
|
0
|
0
|
626
|
|
POST
|
It says to get it from ArcGIS.com but I not sure where. From ArcGIS Server 10 sp1, map services provide a legend resource to return legend details. With map services prior to this version, the legend control uses a SOAP legend service provided by ArcGIS.com. You have nothing to do to get it, it's predefined in the legend control : depending on the map service version, the legend is requested on arcgis.com or on the map service itself. Note that the SDK sample http://help.arcgis.com/en/webapi/silverlight/2.1/samples/start.htm#LegendSimple is using a 9.3.1 dynamic map service (http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty). Secondly, it says that the Map Service must be public. What exactly does this mean?? It means that, with map services prior to 10SP1, arcgis.com must be able to access to your map service in order to return the swatches. For example, this can't work with a service like http://localhost/arcgis/rest/..... because the arcgis.com soap service can't access to your localhost. This limitation doesn't exist with 10SP1 map services.
... View more
11-10-2010
03:19 AM
|
0
|
0
|
2152
|
| 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
|