|
POST
|
Hi, Unfortunately I have not been able to reproduce the problem. Here's the code I'm trying - it should be approximately similar to yours: Code:
TileLayer _bingLayer;
private void BingRadioButton_Checked(object sender, RoutedEventArgs e)
{
string layerTypeTag = (string)((RadioButton)sender).Tag;
ESRI.ArcGIS.Client.Bing.TileLayer.LayerType layerType = null;
switch (layerTypeTag)
{
case ("Road"):
layerType = TileLayer.LayerType.Road;
break;
case ("Aerial"):
layerType = TileLayer.LayerType.Aerial;
break;
case ("AerialWithLabels"):
layerType = TileLayer.LayerType.AerialWithLabels;
break;
}
if (_map.Layers["_bingLayer"] != null)
{
_acceleratedDisplayLayersGroup.ChildLayers.Remove(_bingLayer);
}
_bingLayer = new TileLayer
{
ID="_bingLayer",
LayerStyle = layerType,
ServerType = ServerType.Production,
Token = "<ENTER TOKEN HERE>",
Visible = true,
ShowLegend = false
};
_acceleratedDisplayLayersGroup.ChildLayers.Add(_bingLayer);
}
XAML:
<Grid>
<esri:Map x:Name="_map" UseAcceleratedDisplay="False">
<esri:AcceleratedDisplayLayers x:Name="_acceleratedDisplayLayersGroup">
</esri:AcceleratedDisplayLayers>
</esri:Map>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<RadioButton x:Name="RoadRadioButton" Checked="BingRadioButton_Checked"
Tag="Road" IsChecked="true" Margin="5,0,0,0"
GroupName="Layers" Content="Road" />
<RadioButton x:Name="AerialRadioButton" Checked="BingRadioButton_Checked"
Tag="Aerial" Margin="5,0,0,0"
GroupName="Layers" Content="Aerial" />
<RadioButton x:Name="AerialWithLabelsRadioButton" Checked="BingRadioButton_Checked"
Tag="AerialWithLabels" Margin="5,0,0,0"
GroupName="Layers" Content="Aerial - Labels"/>
</StackPanel>
</Grid>
Cheers Mike
... View more
09-18-2012
04:42 AM
|
0
|
0
|
1915
|
|
POST
|
Hi, So there was no indication of a failed request in Fiddler when the exception occurred? Which server/service are you using - is it publically accessible? Cheers Mike
... View more
09-14-2012
01:09 AM
|
0
|
0
|
3078
|
|
POST
|
Hi, I'm not sure exactly what kind of test you'd like to run but you I hope you'll be able to find your answer in the conceptual documentation - here's the getting started in Visual Studio topic: http://resources.arcgis.com/en/help/runtime-wpf/concepts/index.html#/Getting_started_with_Visual_Studio/01700000002q000000/. You can also find the API reference here: http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html Cheers Mike
... View more
09-14-2012
01:05 AM
|
0
|
0
|
503
|
|
POST
|
Thanks Mike So, I fixed my problem by choosing Dynamic Layer. So, I am going to ask you a question, and not for the problem, because the problem is fixed, but to learn best practices. I used Feature Layer, because I want to use the identity task. This is the reason I chose the feature layer. So, I think that choice was valid for the task, but not for the size and complexity of the features. If we need Identity task, we should use feature layer Am I right? Second, In my case, the identity will be only required for the polygons where the client has buildings, which are only the main land and three other islands, which means three polygons out of 6500 polygons that are totally useless but we need to display them anyway. So what the best practices in this way? Like this example is going to be repeated for many clients (I believe), where you have contour for lands, which contains hundreds of small islands, and most of them useless because they are inhabitants, but you want to display them as background anyway, but you are interested in few polygons to get their attributes Should you split this into two layers? Hi, #1. To use the Identify Task you should use either LocalMapServices or online map services. For LocalMapServices you can use the LocalMapService.UrlMapService property and add the layer id (e.g. + "/1"). For online services you should browse the ArcGIS Rest catalog to get the layer URL e.g. http://sampleserver6.arcgisonline.com/arcgis/rest/. #2. You could probably achieve this in a number of ways. One approach might be to investigate adding the layer twice, with a definition query applied to each one in the first case to only include the few polygons you are interested in and the second case to include the remaining 1000s of polygons. Or you could perform a queryto return the few polygons you are interested in and add those to the map as graphics. That would allow you to provide additional interaction with those polygons such as adding MapTips. Cheers Mike
... View more
09-12-2012
02:20 AM
|
0
|
0
|
361
|
|
POST
|
Hi, This happens when an image cannot be download for some reason - perhaps a network interruption, service/server interruption, etc. However we've only ever had a few report of this exception and have not been able to reproduce it. I'd really appreciate it if you could use Fiddler to view the requests/responses and post anything related to the error (or alternatively email me on [email protected]). There is an Error property on the ArcGISTiledMapServiceLayer.TiledLoaded event - you could try handling that event and checking the error property. For more info see http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.TiledLayer~TileLoaded_EV.html (ignore the SilverLight info). However, I'm not sure that the event fires in the case of the NotSupportedException you are seeing. Cheers Mike
... View more
09-12-2012
01:28 AM
|
0
|
0
|
3078
|
|
POST
|
Hi, Unfortunately this would appear to be an issue in the LocalFeatureService and is being investigated. Cheers Mike
... View more
09-12-2012
12:35 AM
|
0
|
1
|
2207
|
|
POST
|
Hi, Assuming you're working with the ArcGIS Runtime SDK for WPF... After calling Initialize on a layer you should wait for the Initialized event to fire. This means the request/response cycle has happened and the layer properties have been set based on the information available on the REST endpoint for the service. Making the REST request yourself would be exactly the same, just more complicated. If you're waiting for all the layers to be initalized then you should handle the LayersInitialized event on the Map.Layers collection: http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.LayerCollection~LayersInitialized_EV.html. Cheers Mike
... View more
09-11-2012
12:28 AM
|
0
|
0
|
570
|
|
POST
|
Hi, As Antti posted - you need to make sure that after the layer has initialized you're calling the Update() method on the layer and handling the UpdateCompleted event. At that point the layer should be populated with features. Cheers Mike
... View more
09-10-2012
04:49 AM
|
0
|
0
|
2195
|
|
POST
|
Hi, Your workflow is almost right. You can work with FeatureLayers / ArcGISLocalFeatureLayers without adding them to the map. The main difference when not adding the layer to the map is that you should use Snapshot instead of the default mode, OnDemand, which uses the map extent to request features. Snapshot mode gets a snapshot of all features or all available features up to the service imposed limit (determined by the service published when using ArcGIS for Server or you can set this for local feature services). For more info see http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer+QueryMode.html. It�??s also worth noting the different behaviour of the following methods: .Update() = Selections and unsaved edits will be lost on Update. Performs a new refreshed query against the service and refreshes the graphics layer. .SaveEdits() = Save edits to the layer. Only required if AutoSave is false. .Refresh() = Forces a full redraw of all graphic features but does not affect selections or unsaved edits. Cheers Mike
... View more
09-10-2012
12:40 AM
|
0
|
0
|
2195
|
|
POST
|
Hi, This is something we are considering adding in a future release - I'd really appreciate if you could submit a suggestion over at the ArcGIS Ideas site: http://ideas.arcgis.com/ideaList?category=ArcGIS+Runtime. Otherwise, you could write a custom TiledMapServiceLayer - there's actually an example in the API reference: http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.TiledMapServiceLayer.html. Cheers Mike
... View more
09-09-2012
11:55 PM
|
0
|
0
|
895
|
|
POST
|
Hi, I have been testing your Map Package but unfortunately have not been able to reproduce the SEHException you were experiencing. A feature layer is definitely not the best option for this type of layer though, as it seems to contain polygons with very complex geometry. When you're dealing with polygons, you need to take into account the total number of features and the complexity of the geometry (i.e. the number of vertices per polygon). A dynamic map service layer is a better option for this type of data because the individual features and feature vertices are not loaded into memory within the client application. One other thing to note is that local layers defined in XAML will automatically start the required local service, therefore you do not need to do this separately in code. If you'd prefer to define the local service in XAML in order to set properties such as the MaxRecords, you can do this as a resource:
...
<Grid.Resources>
<esri:LocalFeatureService x:Key="FeatureService" Path="C:\Temp\SOPFIM_Full.mpk" MaxRecords="1000000" />
</Grid.Resources>
...
<esri:ArcGISLocalFeatureLayer ID="arcGISLocalFeatureLayer"
Service="{StaticResource FeatureService}"
LayerName="ContourQC" IsHitTestVisible="False"/>
I also disabled hittesting on that layer too, which you can do to improve performance if you do not require hit testing for functionality such as MapTips. Cheers Mike
... View more
09-07-2012
07:03 AM
|
0
|
0
|
2163
|
|
POST
|
Hi, You could try an intersect using the GeometryService (http://sampleserver3.arcgisonline.com/ArcGIS/SDK/REST/index.html?intersect.html) but I think you'd need to iterate over the buffers passing the points as the input geometries (or the opposite, iterate over the points passing the buffers as input geometries). Alternatively you could look at rolling the buffer and intersect into a single Geoprocessing model and publishing that as a Geoprocessing service. Cheers Mike
... View more
09-03-2012
12:51 AM
|
0
|
0
|
1991
|
|
POST
|
Hi, One simple approach is to just handle the mouse enter and mouse leave events on the map element and switch the cursor in those events. It needs to be a .cur file or .ani file (there are apps you can download to convert your images) and apparently it has to be referenced by absolute path too, as opposed to relative path or pack uri. XAML:
<esri:Map x:Name="MyMap" MouseEnter="Map_MouseEnter" MouseLeave="Map_MouseLeave">
<esri:ArcGISTiledMapServiceLayer ID="MyLayer"
Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
</esri:Map>
CODE:
private void Map_MouseEnter(object sender, MouseEventArgs e)
{
this.Cursor = Cursors.None;
Cursor cursor = new Cursor(@"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\VsGraphics\Assets\Cursors\magicwand.cur");
this.Cursor = cursor;
}
private void Map_MouseLeave(object sender, MouseEventArgs e)
{
this.Cursor = Cursors.Hand;
}
Cheers Mike
... View more
08-30-2012
01:42 AM
|
0
|
0
|
923
|
|
POST
|
Hi, License requirements can be found here: http://resources.arcgis.com/en/help/runtime-wpf/concepts/index.html#/Functionality_set_requirements/017000000067000000/ Cheers Mike
... View more
08-30-2012
12:37 AM
|
0
|
0
|
1279
|
|
POST
|
Hi, Are you making the SetLicense call before InitializeComponent? Cheers Mike
... View more
08-24-2012
01:02 AM
|
0
|
0
|
1279
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-14-2026 05:04 AM | |
| 1 | 02-20-2024 07:02 AM | |
| 1 | 01-19-2026 06:44 AM | |
| 1 | 12-10-2025 07:16 AM | |
| 1 | 11-21-2025 08:12 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-02-2026
06:07 AM
|