You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
4
+
// You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0
5
+
//
6
+
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
7
+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
8
+
// language governing permissions and limitations under the License.
9
+
10
+
usingEsri.ArcGISRuntime.Data;
11
+
usingEsri.ArcGISRuntime.Geometry;
12
+
usingEsri.ArcGISRuntime.Mapping;
13
+
usingEsri.ArcGISRuntime.Symbology;
14
+
usingEsri.ArcGISRuntime.Tasks;
15
+
usingEsri.ArcGISRuntime.Tasks.Offline;
16
+
usingEsri.ArcGISRuntime.UI;
17
+
usingEsri.ArcGISRuntime.ArcGISServices;
18
+
usingEsri.ArcGISRuntime.UI.Controls;
19
+
usingSystem;
20
+
usingSystem.Linq;
21
+
usingSystem.Threading.Tasks;
22
+
usingMicrosoft.UI.Xaml;
23
+
usingMicrosoft.UI.Xaml.Input;
24
+
25
+
namespaceArcGIS.WinUI.Samples.DisplayOverviewMap
26
+
{
27
+
[ArcGIS.Samples.Shared.Attributes.Sample(
28
+
name:"Display overview map",
29
+
category:"Map",
30
+
description:"Include an overview or inset map as an additional map view to show the wider context of the primary view.",
31
+
instructions:"Pan or zoom across the map view to browse through the tourist attractions feature layer and notice the viewpoint and scale of the linked overview map update automatically. When running the sample on a desktop, you can also navigate by panning and zooming on the overview map. However, interactivity of the overview map is disabled on mobile devices.",
Include an overview or inset map as an additional map view to show the wider context of the primary view.
4
+
5
+

6
+
7
+
## Use case
8
+
9
+
An overview map provides a useful, smaller-scale overview of the current map view's location. For example, when you need to inspect a layer with many features while remaining aware of the wider context of the view, use an overview map to help show the extent of the main map view.
10
+
11
+
## How to use the sample
12
+
13
+
Pan or zoom across the map view to browse through the tourist attractions feature layer and notice the viewpoint and scale of the linked overview map update automatically. When running the sample on a desktop, you can also navigate by panning and zooming on the overview map. However, interactivity of the overview map is disabled on mobile devices.
14
+
15
+
## How it works
16
+
17
+
1. Create a `Map` with the `ArcGISTopographic` basemap style and add it to the `MapView`.
18
+
2. Instantiate a `FeatureLayer` from a `ServiceFeatureTable` and append it to the `Map`'s operational layers.
19
+
3. In the user-interface, declare an `OverviewMap` object from the ArcGIS Maps SDK for .NET Toolkit.
20
+
4. Assign the `MapView` to the `MyOverviewMap.GeoView` property of the `OverviewMap` to connect the `MapView` with the `OverviewMap`.
21
+
5. Set the scale factor of the `OverviewMap` with the `MyOverviewMap.ScaleFactor`.
22
+
23
+
## Relevant API
24
+
25
+
* MapView
26
+
* OverviewMap
27
+
28
+
## About the data
29
+
30
+
The data used in this sample is the [OpenStreetMap Tourist Attractions for North America](https://www.arcgis.com/home/item.html?id=addaa517dde346d1898c614fa91fd032) feature layer, which is scale-dependent and displays at scales larger than 1:160,000.
31
+
32
+
## Additional information
33
+
34
+
This sample uses the overview map toolkit component which can be accessed using the Esri.ArcGISRuntime.Toolkit nuget package. The [toolkit](https://github.com/Esri/arcgis-toolkit-dotnet) can also be cloned and set up locally. For information about setting up the toolkit, visit the [repository](https://github.com/Esri/arcgis-toolkit-dotnet/blob/main/README.md).
35
+
36
+
## Tags
37
+
38
+
context, inset, map, minimap, overview, preview, small scale, toolkit, view
Copy file name to clipboardExpand all lines: src/WinUI/readme.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -165,6 +165,7 @@
165
165
*[Create and save map](ArcGIS.WinUI.Viewer/Samples/Map/AuthorMap) - Create and save a map as an ArcGIS `PortalItem` (i.e. web map).
166
166
*[Create dynamic basemap gallery](ArcGIS.WinUI.Viewer/Samples/Map/CreateDynamicBasemapGallery) - Implement a basemap gallery that automatically retrieves the latest customization options from the basemap styles service.
167
167
*[Display map](ArcGIS.WinUI.Viewer/Samples/Map/DisplayMap) - Display a map with an imagery basemap.
168
+
*[Display overview map](ArcGIS.WinUI.Viewer/Samples/Map/DisplayOverviewMap) - Include an overview or inset map as an additional map view to show the wider context of the primary view.
168
169
*[Download preplanned map area](ArcGIS.WinUI.Viewer/Samples/Map/DownloadPreplannedMap) - Take a map offline using a preplanned map area.
169
170
*[Generate offline map](ArcGIS.WinUI.Viewer/Samples/Map/GenerateOfflineMap) - Take a web map offline.
170
171
*[Generate offline map (overrides)](ArcGIS.WinUI.Viewer/Samples/Map/GenerateOfflineMapWithOverrides) - Take a web map offline with additional options for each layer.
0 commit comments