Skip to content

Commit 0ac66b1

Browse files
committed
Merge pull request #133 from Esri/antt0000-1027fixes
Sample fixes based on feedback
2 parents fe814bf + 92b9883 commit 0ac66b1

File tree

9 files changed

+56
-41
lines changed

9 files changed

+56
-41
lines changed

src/Desktop/ArcGISRuntimeSamplesDesktop/Samples/Editing/EditRelatedData.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private async void MyMapView_MapViewTapped(object sender, MapViewInputEventArgs
4242
var currentViewpoint = MyMapView.GetCurrentViewpoint(ViewpointType.BoundingGeometry);
4343
var viewpointExtent = currentViewpoint.TargetGeometry.Extent;
4444

45-
var parameter = new IdentifyParameters(mapPoint, viewpointExtent, 2, (int)MyMapView.ActualHeight, (int)MyMapView.ActualWidth);
45+
var parameter = new IdentifyParameters(mapPoint, viewpointExtent, 5, (int)MyMapView.ActualHeight, (int)MyMapView.ActualWidth);
4646

4747
// Clears map of any highlights.
4848
var overlay = MyMapView.GraphicsOverlays["Highlighter"] as GraphicsOverlay;

src/Desktop/ArcGISRuntimeSamplesDesktop/Samples/GraphicsLayers/SmoothGraphicAnimation.xaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,13 @@
88
<esri:ArcGISTiledMapServiceLayer ServiceUri="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
99
</esri:Map>
1010
</esri:MapView>
11+
<Border Background="White" BorderBrush="Black" BorderThickness="1"
12+
HorizontalAlignment="Right" VerticalAlignment="Top"
13+
Margin="30" Padding="20" Width="355">
14+
<StackPanel>
15+
<TextBlock Text="Click to add two points to the map. The graphic animates between the two points using a Quintic easing function."
16+
TextAlignment="Left" TextWrapping="Wrap" />
17+
</StackPanel>
18+
</Border>
1119
</Grid>
1220
</UserControl>

src/Desktop/ArcGISRuntimeSamplesDesktop/Samples/Scene/SetSunTime.xaml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
66
xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
77
mc:Ignorable="d" >
8-
<Grid>
9-
<esri:SceneView x:Name="MySceneView" AmbientLight="Gray">
10-
<esri:Scene>
11-
<esri:Scene.Surface>
12-
<esri:ServiceElevationSource ServiceUri="http://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"
8+
<Grid>
9+
<esri:SceneView x:Name="MySceneView" AmbientLight="Gray">
10+
<esri:Scene>
11+
<esri:Scene.Surface>
12+
<esri:ServiceElevationSource ServiceUri="http://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"
1313
IsEnabled="True" ID="elevationLayer" />
14-
</esri:Scene.Surface>
15-
<esri:ArcGISTiledMapServiceLayer ID="AGOLayer"
14+
</esri:Scene.Surface>
15+
<esri:ArcGISTiledMapServiceLayer ID="AGOLayer"
1616
ServiceUri="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
17-
<esri:SceneLayer ID="BostonSceneLayer"
18-
ServiceUri="http://scene.arcgis.com/arcgis/rest/services/Hosted/Building_Berlin/SceneServer/layers/0"/>
19-
</esri:Scene>
20-
</esri:SceneView>
21-
<Border Background="White" BorderBrush="Black" BorderThickness="1"
17+
<esri:SceneLayer ID="BerlinSceneLayer"
18+
ServiceUri="http://scene.arcgis.com/arcgis/rest/services/Hosted/Buildings_Berlin/SceneServer/layers/0"/>
19+
</esri:Scene>
20+
</esri:SceneView>
21+
<Border Background="White" BorderBrush="Black" BorderThickness="1"
2222
HorizontalAlignment="Left" VerticalAlignment="Top" Width="180"
2323
Margin="20" Padding="20">
24-
<StackPanel >
25-
<Label Content="UTC Berlin:"/>
26-
<Label x:Name="AnimateSunTimeLabel"/>
27-
<ToggleButton x:Name="AnimateSunTimeButton" Height="30" Padding="5" Content="Animate Sun Time" Margin="0,5" Click="Animate_Click"/>
28-
</StackPanel>
29-
</Border>
30-
</Grid>
24+
<StackPanel >
25+
<Label Content="UTC Berlin:"/>
26+
<Label x:Name="AnimateSunTimeLabel"/>
27+
<ToggleButton x:Name="AnimateSunTimeButton" Height="30" Padding="5" Content="Animate Sun Time" Margin="0,5" Click="Animate_Click"/>
28+
</StackPanel>
29+
</Border>
30+
</Grid>
3131
</UserControl>

src/Desktop/ArcGISRuntimeSamplesDesktop/Samples/Symbology/TextSymbols.xaml.cs

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,22 @@ private async Task SetupSymbolsAsync()
8686
"Showcard Gothic", "Snap ITC", "Vivaldi", "Wingdings"
8787
};
8888

89-
// Create symbols from font list
90-
_symbols = fontFamilies
91-
.Select(f => new TextSymbol()
92-
{
93-
Text = f,
94-
Color = GetRandomColor(),
95-
HorizontalTextAlignment = HorizontalTextAlignment.Center,
96-
VerticalTextAlignment = VerticalTextAlignment.Bottom,
97-
Font = new SymbolFont(f, 20)
98-
})
99-
.ToList();
89+
// Check what fonts are installed and remove ones that aren't
90+
var notFoundFonts = fontFamilies.Where(f => !Fonts.SystemFontFamilies.Any(fs => fs.Source == f)).ToList();
91+
foreach (var notInstalledFont in notFoundFonts)
92+
fontFamilies.Remove(notInstalledFont);
93+
94+
// Create symbols from font list
95+
_symbols = fontFamilies
96+
.Select(f => new TextSymbol()
97+
{
98+
Text = f,
99+
Color = GetRandomColor(),
100+
HorizontalTextAlignment = HorizontalTextAlignment.Center,
101+
VerticalTextAlignment = VerticalTextAlignment.Bottom,
102+
Font = new SymbolFont(f, 20)
103+
})
104+
.ToList();
100105

101106
// Create image swatches for the UI
102107
Task<ImageSource>[] swatchTasks = _symbols

src/Phone/ArcGISRuntimeSamplesPhone/Samples/Editing/EditRelatedData.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ private async void MyMapView_MapViewTapped(object sender, MapViewInputEventArgs
4545
var layer = MyMapView.Map.Layers["ServiceRequests"] as ArcGISDynamicMapServiceLayer;
4646
var task = new IdentifyTask(new Uri(layer.ServiceUri));
4747
var mapPoint = MyMapView.ScreenToLocation(e.Position);
48-
var parameter = new IdentifyParameters(mapPoint, viewpointExtent, 2, (int)MyMapView.ActualHeight, (int)MyMapView.ActualWidth);
48+
var parameter = new IdentifyParameters(mapPoint, viewpointExtent, 10, (int)MyMapView.ActualHeight, (int)MyMapView.ActualWidth);
4949

5050
// Clears map of any highlights.
5151
var overlay = MyMapView.GraphicsOverlays["Highlighter"] as GraphicsOverlay;

src/Phone/ArcGISRuntimeSamplesPhone/Samples/Mapping/MapOverlays.xaml.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@ public MapOverlays()
2121
this.InitializeComponent();
2222
(MyMapView.Overlays.Items[0] as Grid).DataContext = new MapPoint(-117.19568, 34.056601, SpatialReferences.Wgs84);
2323

24-
MyMapView.SpatialReferenceChanged += MyMapView_SpatialReferenceChanged;
24+
MyMapView.NavigationCompleted += MyMapView_NavigationCompleted;
2525
}
2626

27-
void MyMapView_SpatialReferenceChanged(object sender, EventArgs e)
27+
void MyMapView_NavigationCompleted(object sender, EventArgs e)
2828
{
29-
MyMapView.SpatialReferenceChanged -= MyMapView_SpatialReferenceChanged;
30-
3129
_clickOverlay = FindName("clickOverlay") as FrameworkElement;
3230
_centerOverlay = FindName("centerOverlay") as FrameworkElement;
3331

src/Store/ArcGISRuntimeSamplesStore/Samples/Editing/EditRelatedData.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ private async void MyMapView_MapViewTapped(object sender, MapViewInputEventArgs
4444
// Get current viewpoints extent from the MapView
4545
var currentViewpoint = MyMapView.GetCurrentViewpoint(ViewpointType.BoundingGeometry);
4646
var viewpointExtent = currentViewpoint.TargetGeometry.Extent;
47-
var parameter = new IdentifyParameters(mapPoint, viewpointExtent, 2, (int)MyMapView.ActualHeight, (int)MyMapView.ActualWidth);
47+
var parameter = new IdentifyParameters(mapPoint, viewpointExtent, 10, (int)MyMapView.ActualHeight, (int)MyMapView.ActualWidth);
4848

4949
// Clears map of any highlights.
5050
var overlay = MyMapView.GraphicsOverlays["Highlighter"] as GraphicsOverlay;

src/Store/ArcGISRuntimeSamplesStore/Samples/GraphicsLayers/SmoothGraphicAnimation.xaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,11 @@
1111
<layers:ArcGISTiledMapServiceLayer ServiceUri="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
1212
</esri:Map>
1313
</esri:MapView>
14+
15+
<Border Background="#CC000000" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="30" Padding="20" Width="355">
16+
<StackPanel>
17+
<TextBlock Text="Click to add two points to the map. The graphic animates between the two points using a Quintic easing function." Margin="12,12,12,0" TextWrapping="Wrap" />
18+
</StackPanel>
19+
</Border>
1420
</Grid>
1521
</Page>

src/Store/ArcGISRuntimeSamplesStore/Samples/Mapping/MapOverlays.xaml.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@ public MapOverlays()
2121
this.InitializeComponent();
2222
(MyMapView.Overlays.Items[0] as Grid).DataContext = new MapPoint(-117.19568, 34.056601, SpatialReferences.Wgs84);
2323

24-
MyMapView.SpatialReferenceChanged += MyMapView_SpatialReferenceChanged;
24+
MyMapView.NavigationCompleted += MyMapView_NavigationCompleted;
2525
}
2626

27-
void MyMapView_SpatialReferenceChanged(object sender, EventArgs e)
27+
void MyMapView_NavigationCompleted(object sender, EventArgs e)
2828
{
29-
MyMapView.SpatialReferenceChanged -= MyMapView_SpatialReferenceChanged;
30-
3129
_clickOverlay = FindName("clickOverlay") as FrameworkElement;
3230
_centerOverlay = FindName("centerOverlay") as FrameworkElement;
3331

0 commit comments

Comments
 (0)