|
POST
|
Hmm I'm not quite sure if the server version or database type could cause this issue. It might be best to contact ESRI support on this one or share your service metadata JSON, we can see if we can craft a similar service.
... View more
02-24-2015
03:12 PM
|
0
|
1
|
729
|
|
POST
|
Oh sorry, I didn't realize there was a sample attachment in the thread. It was not visible from the main discussion thread. I see now why you would get TaskCanceledException if you copied the code I provided from click event handler. Your sample is using MouseMove, which will fire numerous times. Thus starting another RequestPointAsync call which cancels previous async call. I was only using RequestPointAsync to get a screen point but you're free to use e.GetPosition() from MouseEventArgs. Going back to the original issue. I tried using your sample as is with my own m-aware service. Your sample uses hit test result to query the table for features. The only thing, I changed was the binding statement since DataContext of the overlay is set to graphics and you want access its Attributes. <TextBlock Text="{Binding Attributes[OBJECTID]}" /> I did not get a crash though.
... View more
02-24-2015
02:04 PM
|
0
|
3
|
3961
|
|
POST
|
Did you await RequestPointAsync? It should return a geometry as soon as you tap or click on the map. The TaskCanceledException may have been triggered by the next call to RequestPointAsync, this will cancel previous async call that has not returned. You can also use MapView.MapViewTapped event to get the screen point for hit test. Could you also share code to reproduce the crash on hit test? Are we using the same version of the API? Are you using WPF, Store or Phone application?
... View more
02-24-2015
10:41 AM
|
0
|
5
|
3962
|
|
POST
|
Hi Darlene, I tried to reproduce with the following code against ArcGIS Runtime SDK for .NET 10.2.5.857 (nuget package) but I am finding these issues instead (no crash) M-aware point returns empty result on hittest. M-aware line do not render. Could you maybe try the following code with your services? xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"> <Grid> <esri:MapView x:Name="MyMapView"> <esri:Map> <esri:ArcGISTiledMapServiceLayer ServiceUri="http://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer"/> <esri:FeatureLayer ID="Line"> <esri:ServiceFeatureTable ServiceUri="http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/1" /> </esri:FeatureLayer> <esri:FeatureLayer ID="Point" > <esri:ServiceFeatureTable ServiceUri="http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0"/> </esri:FeatureLayer> <esri:FeatureLayer ID="LineHasM"> <esri:ServiceFeatureTable ServiceUri="..." /> </esri:FeatureLayer> <esri:FeatureLayer ID="PointHasM"> <esri:ServiceFeatureTable ServiceUri="..." /> </esri:FeatureLayer> </esri:Map> </esri:MapView> <Button VerticalAlignment="Top" HorizontalAlignment="Center" Content="Select" Click="Select_Click"/> </Grid> private async void Select_Click(object sender, RoutedEventArgs e) { string message = null; try { foreach (var layer in MyMapView.Map.Layers.OfType<FeatureLayer>()) { if (layer.SelectedFeatureIDs.Any()) layer.UnselectFeatures(layer.SelectedFeatureIDs.ToArray()); var geometry = await MyMapView.Editor.RequestPointAsync(); var ids = await layer.HitTestAsync(MyMapView, MyMapView.LocationToScreen(geometry)); if (ids != null && ids.Any()) layer.SelectFeatures(ids); } } catch (TaskCanceledException ex) { } catch (Exception ex) { message = ex.Message; } if (!string.IsNullOrWhiteSpace(message)) MessageBox.Show(message); } Thanks.
... View more
02-23-2015
02:19 PM
|
0
|
7
|
3962
|
|
POST
|
As Dominique mentioned we have several toolkit samples that do this. It might be best to see them in action during debug so you can better understand how the map is passed to the controls. So if you have a different UserControl for your attribute query (i.e. AttributeQueryControl), you will need to define a Map as DependencyProperty like this: // Map to print (Dependency Property)
public ESRI.ArcGIS.Client.Map Map
{
get { return (ESRI.ArcGIS.Client.Map)GetValue(MapProperty); }
set { SetValue(MapProperty, value); }
}
public static readonly DependencyProperty MapProperty = DependencyProperty.Register("Map", typeof(ESRI.ArcGIS.Client.Map), typeof(AttributeQueryControl), new PropertyMetadata(null, OnMapChanged));
private static void OnMapChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var control = d as AttributeQueryControl;
var newMap = e.NewValue as ESRI.ArcGIS.Client.Map;
// Do what you need to do with the map here.
} Which you can then later you use like this: <esri:Map x:Name="MyMap" WrapAround="True" Extent="-15000000,2000000,-7000000,8000000">
<esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer"
Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
<esri:GraphicsLayer ID="MyGraphicsLayer" />
</esri:Map>
<local:AttributeQueryControl x:Name="MyControl" Map="{Binding ElementName=MyMap}" VerticalAlignment="Center" HorizontalAlingment="Center"/>
... View more
01-28-2015
09:07 AM
|
0
|
2
|
1421
|
|
POST
|
You can use https, is this for token-secured service? QueryTask, like the other tasks have a Token property if you want to set this explicitly. Or you can also enable IdentityManager with SignInDialog or your own control that lets you set username/password for the secured service. To use IdentityManager and SignInDialog, you can refer to the Security samples here: ArcGIS API for Silverlight - Interactive Samples | ArcGIS for Developers (should be similar to WPF). Or if you have a token string, set QueryTask.Token property. If you have to go through a proxy, there's also ProxyUrl. This doc might help : ArcGIS Runtime SDK for WPF
... View more
01-16-2015
12:10 PM
|
1
|
1
|
613
|
|
POST
|
I see how this could be a problem with Polyline geometry using touch. When using mouse to click on graphic, the edit completes but it's difficult when you use touch. ArcGIS API for Silverlight - Interactive Samples | ArcGIS for Developers unless Edit Vertices was unchecked. Another way to complete the edit is to call EditGeometry.StopEdit(). If using Editor or EditorWidget, the edit will complete by user interaction click/tap on graphic.
... View more
01-16-2015
10:44 AM
|
0
|
0
|
1340
|
|
POST
|
Hi, For the most part, you just need to set the culture to "fr". Thread.CurrentThread.CurrentCulture = new CultureInfo("fr"); Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr"); FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement), new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag))); For updating the controls to be localized, you can refer to this blog post: Localizing ArcGIS Silverlight/WPF controls | ArcGIS Blog Thanks. Jennifer
... View more
01-09-2015
05:00 PM
|
0
|
0
|
2272
|
|
POST
|
Hi Justin, What version of ArcGIS API for Silverlight do you have? I'm only able to reproduce the issue if I build our source code (debug|release) but I couldn't reproduce with current released 3.2 assemblies. Thanks. Jennifer
... View more
12-17-2014
11:18 AM
|
0
|
0
|
1012
|
|
POST
|
Similar to the sample, you have to get service metadata for the table. But instead of GetDetails, you use ServiceInfo. Also, similar to the sample when you query relationship, you will need to provide the feature id and relationship id. Something like this.. var geodatabase = await Geodatabase.OpenAsync(filePath); var layer = new FeatureLayer(geodatabase.GetFeatureTableById(0)); var table = (ArcGISFeatureTable)layer.FeatureTable; var relationshipID = table.ServiceInfo.Relationships[0].ID; var results = await table.QueryRelatedAsync(featureID, relationshipID);
... View more
12-17-2014
10:12 AM
|
0
|
1
|
1802
|
|
POST
|
You can look at this SDK sample : arcgis-runtime-samples-dotnet/EditRelatedData.xaml.cs at master · Esri/arcgis-runtime-samples-dotnet · GitHub Although sample use QueryTask (online), similar parameters can be used to access related data off ArcGISFeatureTable. Just note that when you generate the geodatabase, you must also request for the related table. ArcGISFeatureTable.QueryRelatedAsync Method (Boolean, Int64)
... View more
12-16-2014
12:57 PM
|
0
|
3
|
1802
|
|
POST
|
I have not done this myself but this msdn link might help you get started: Walkthrough: Office Programming (C# and Visual Basic)
... View more
12-03-2014
01:06 PM
|
0
|
1
|
623
|
|
POST
|
Hi Justin, Sorry for that inconvenience and thank you for your suggestion. We'll try to include this fix in future release. Thanks.
... View more
12-03-2014
12:43 PM
|
0
|
0
|
1012
|
|
POST
|
Hi Sadanand, Can you check the web response? You can run Fiddler while your app is making the query, it should look similar to this: If the JSON has spatialReference that is correct (same as outSR=102100), check that QueryResult.Features SR is also the same.
... View more
12-03-2014
12:42 PM
|
0
|
13
|
3233
|
|
POST
|
Hi, I think these SDK sample might help: ArcGIS API for Silverlight - Interactive Samples | ArcGIS for Developers (uses LegendControl in the Toolkit to update layer visibility). You can get an enumerable of visible layers using Linq query var visibleLayers = from l in MyMap.Layers where l.Visible select l; If you need to re-order the layers, you can use Insert MyMap.Layers.Insert(index, layer);
... View more
12-03-2014
12:04 PM
|
0
|
0
|
519
|
| 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
|