|
POST
|
You can update the TableOfContents LayerItemTemplate property and add an event say MouseUp on Layer name, update its Binding to retrieve LayerContent, this should match the layer on your map. From the original source code, I only modified this bit - line 60-61 (see Text and DataContext). <Grid.Resources>
<HierarchicalDataTemplate x:Key="MyLayerTemplate" ItemsSource="{Binding Sublayers}">
<Grid Margin="0,2" >
<Grid.Resources>
<Style TargetType="MenuItem" x:Key="HideMenuItemWhenDisabled">
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Visibility" Value="Collapsed" />
</Trigger>
</Style.Triggers>
</Style>
</Grid.Resources>
<Grid.Style>
<Style TargetType="Grid">
<Style.Triggers>
<DataTrigger Binding="{Binding IsInScaleRange, Mode=OneWay}" Value="false">
<Setter Property="Opacity" Value=".5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<Grid.ContextMenu>
<ContextMenu>
<MenuItem IsCheckable="True" IsChecked="{Binding LayerContent.IsVisible, Mode=TwoWay}" Header="Enabled" IsEnabled="{Binding LayerContent.CanChangeVisibility}" Style="{StaticResource HideMenuItemWhenDisabled}" />
<MenuItem Command="{Binding ZoomToCommand}" Header="Zoom to" Style="{StaticResource HideMenuItemWhenDisabled}" />
<MenuItem Command="{Binding ReloadCommand}" Header="Reload" Style="{StaticResource HideMenuItemWhenDisabled}" />
</ContextMenu>
</Grid.ContextMenu>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<esri:SymbolDisplay Symbol="{Binding Symbol, Mode=OneTime}" Margin="0,0,5,0" MaxHeight="40" MaxWidth="40">
<esri:SymbolDisplay.Style>
<Style TargetType="esri:SymbolDisplay">
<Style.Triggers>
<DataTrigger Binding="{Binding Symbol, Mode=OneTime}" Value="{x:Null}">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
</esri:SymbolDisplay.Style>
</esri:SymbolDisplay>
<CheckBox Grid.Column="1" IsChecked="{Binding LayerContent.IsVisible, Mode=TwoWay}">
<CheckBox.Style>
<Style TargetType="CheckBox">
<Style.Triggers>
<DataTrigger Binding="{Binding LayerContent.CanChangeVisibility, Mode=OneTime}" Value="False">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
</CheckBox.Style>
</CheckBox>
<TextBlock Text="{Binding Name}" MouseUp="OnMouseUp"
DataContext="{Binding LayerContent, Mode=OneWay}" Grid.Column="2" VerticalAlignment="Center">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<DataTrigger Binding="{Binding HasError}" Value="True">
<Setter Property="Foreground" Value="Red" />
</DataTrigger>
<DataTrigger Binding="{Binding IsActive}" Value="False">
<Setter Property="Opacity" Value=".5" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</Grid>
</HierarchicalDataTemplate>
</Grid.Resources> <esri:TableOfContents Grid.Row="0" x:Name="toc"
LayerItemTemplate="{StaticResource MyLayerTemplate}"
GeoView="{Binding ElementName=mapView}" ShowLegend="False" > private void OnMouseUp(object sender, MouseButtonEventArgs e)
{
var datacontext = (sender as FrameworkElement)?.DataContext as ILayerContent;
}
... View more
07-10-2018
04:26 PM
|
1
|
1
|
1117
|
|
POST
|
There currently is no SketchEditor for SceneView but you should be able to use PolylineBuilder and GeoViewTapped events. Something like this. PolylineBuilder builder = new PolylineBuilder(SpatialReferences.Wgs84);
private void MySceneView_GeoViewTapped(object sender, GeoViewInputEventArgs e)
{
builder.AddPoint(e.Location);
var overlay = MySceneView.GraphicsOverlays.FirstOrDefault();
var graphic = overlay.Graphics.FirstOrDefault();
if (graphic == null)
overlay.Graphics.Add(new Graphic(builder.ToGeometry(), new SimpleLineSymbol(SimpleLineSymbolStyle.Solid, Color.Red, 3)));
else
graphic.Geometry = builder.ToGeometry();
} In sample code above, we use tapped location but if you have 3D objects you want considered (i.e. buildings in ArcGISSceneLayer), you might want to use this location instead. var location = await MySceneView.ScreenToLocationAsync(e.Position); Meanwhile, you can try looking into one of our demo apps originally written against ArcGIS Runtime for .NET 10.x. I updated it slightly to use 100.x in this branch. I hope it will help you get started.
... View more
07-10-2018
03:43 PM
|
0
|
0
|
730
|
|
POST
|
You might want to check out this guide doc for editing to help get you started. For shapefile, you're limited to updating feature geometry and attributes, no feature attachments so you can ignore that part of the guide doc. There are other samples here which you might be interested in.
... View more
07-02-2018
11:57 AM
|
1
|
0
|
1376
|
|
POST
|
For ServiceFeatureTable, you can use ManualCache mode to specify the OutFields. If renderer used by service requires for a specific field name and you did not request for it. For example in this case, 'symbolid' then nothing will render. var table = new ServiceFeatureTable(new Uri("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/2")) { FeatureRequestMode = FeatureRequestMode.ManualCache };
await table.PopulateFromServiceAsync(new QueryParameters() { WhereClause = "1=1" }, true, new string[] { "objectid", "symbolid" });
MyMapView.Map.OperationalLayers.Add(new FeatureLayer(table));
... View more
07-02-2018
11:41 AM
|
0
|
0
|
2587
|
|
POST
|
If you are using v100.2.+, you can use ShapefileFeatureTable to create/update/delete features. This inherits from FeatureTable so methods include CreateFeature, Add/Update/DeleteFeature(s)Async. You can create a FeatureLayer with this table. Is this what you are looking for?
... View more
06-28-2018
03:53 PM
|
0
|
2
|
1376
|
|
POST
|
Kindly see `Create a raster from a mosaic dataset` from this guide doc.
... View more
06-28-2018
03:48 PM
|
2
|
1
|
1284
|
|
POST
|
Thank you for providing us a repro sample. I was able to reproduce with v100.2.1, quickly switching tabs would sometimes not redraw the map. However this appears fixed with latest dev build for v100.3.
... View more
06-27-2018
04:14 PM
|
1
|
1
|
4225
|
|
POST
|
Thank you for sharing your data and code. I'm able to reproduce the issue. SpatialReference.Equals should have been true regardless of z-value and GeometryEngine.RemoveZAndM should have been enough to clear feature geometry of z to allow GeometryEngine.Contains to work. However, SpatialReference.Equals still fail, although the wkt string matched. I have logged an issue for this. Meanwhile, you can use the following workaround before calling GeometryEngine.Contains or SpatialReference.Equals. geomFeat = GeometryEngine.RemoveZAndM(geomFeat);
geomFeat = Geometry.FromJson(geomFeat.ToJson());
... View more
06-27-2018
12:47 PM
|
0
|
2
|
1677
|
|
POST
|
Have you seen this SDK sample using `Xamarin.Auth.OAuth2Authenticator`? Android, iOS and UWP have their own page renderer that deals with presenting UI when challenge for credential occurs.
... View more
06-27-2018
10:27 AM
|
0
|
0
|
2127
|
|
POST
|
Thank you for your feedback. We ignore multi-touch gestures for sketch editor. Which version of the api are you using? To better assist, can you share which platform and code? You may also try to disable sketch editor in code this way... var pinchGestureRecognizer = new PinchGestureRecognizer();
pinchGestureRecognizer.PinchUpdated += (s, e) =>
{
if (MyMapView.SketchEditor.IsEnabled)
MyMapView.SketchEditor.IsEnabled = e.Status == GestureStatus.Canceled || e.Status == GestureStatus.Completed;
};
MyMapView.GestureRecognizers.Add(pinchGestureRecognizer); To cancel or complete sketch in v100.x, use Cancel/CompleteCommand. if (MyMapView.SketchEditor.CancelCommand.CanExecute(null))
MyMapView.SketchEditor.CancelCommand.Execute(null); You may check SketchEditor.Geometry property and MyMapView.GeometryChanged events. For Freehand, you should get this event on mouse/touch up.
... View more
06-14-2018
10:57 AM
|
0
|
0
|
1573
|
|
POST
|
Hi Richard, I'm able to reproduce the issue. Calling `MyMapView.CancelSetViewpointOperations();` before SetViewpoint also does not seem to cancel animation. I have logged an issue. Meanwhile, this worked for me but I am not sure if it's an option for your app... workaround is to disable flick. MyMapView.InteractionOptions = new MapViewInteractionOptions() { IsFlickEnabled = false }; Thank you for your feedback. Jennifer
... View more
06-05-2018
10:53 AM
|
1
|
2
|
2859
|
|
POST
|
While the overload with `QueryFeatureFields` is only on `ServiceFeatureTable`. As Antti noted, features must be loaded. `LoadAsync` on `ArcGISFeature` will do this as well, load all of feature attributes. This is available on features belonging to an `ArcGISFeatureTable` (i.e. ServiceFeatureTable, GeodatabaseFeatureTable).
... View more
05-21-2018
09:49 AM
|
0
|
0
|
2039
|
|
POST
|
Yes, this is possible with latest released version of the SDK. You can update the symbol properties of SketchEditor.Style. The only difference from v10.2.x is we had these symbol properties under EditorConfiguration. In v100.x, anything related to changing the look and feel of SketchEditor is under Style and properties that enables/disables certain edit functionality is under SketchEditConfiguration.
... View more
05-14-2018
01:12 PM
|
2
|
0
|
1079
|
|
POST
|
Windows 7 SP1 meets system requirement DirectX ArcGIS Runtime SDK for .NET uses DirectX to provide high-performance rendering of maps and scenes. Direct3D feature level 9_3 minimum. Default: DirectX 11 hardware support. Falls back to DirectX 11 software rendering if hardware support is not available It appears to be same error found by others in this thread, can you try to install recommended Windows updates? If machine is up to date, can you try the remarks section here, there is a link to platform update for Windows 7?
... View more
05-09-2018
10:04 AM
|
0
|
0
|
853
|
|
POST
|
Cool thanks for sharing your workaround. That doesn't sound so bad then.
... View more
05-07-2018
04:31 PM
|
0
|
1
|
1140
|
| 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 |
11-03-2025
08:39 PM
|