|
1 | 1 | # Show grid |
2 | 2 |
|
3 | | -Display coordinate system grids including latitude-longitude, MGRS, UTM and USNG on a map view. Also, toggle label visibility and change the color of grid lines and grid labels. |
| 3 | +Display and customize coordinate system grids, including Latitude/Longitude, MGRS, UTM, and USNG, on a map view or scene view. |
4 | 4 |
|
5 | 5 |  |
6 | 6 |
|
7 | 7 | ## Use case |
8 | 8 |
|
9 | | -Grids are often used on printed maps, but can also be helpful on digital maps, to identify locations on a map. |
| 9 | +Grids are often used on printed maps, but can also be helpful on digital 2D maps or 3D scenes, to identify locations. |
10 | 10 |
|
11 | 11 | ## How to use the sample |
12 | 12 |
|
13 | | -Tap the button in the toolbar to open the grid settings view. You can select type of grid from grid types (LatLong, MGRS, UTM and USNG) and modify its properties like grid visibility, grid color, label visibility, label color, label position, label format and label unit. |
| 13 | +Use the picker to change the view from 2D or 3D, or tap the button in the toolbar to open the grid settings. You can select the type of grid (LatLong, MGRS, UTM, and USNG) and modify its properties like the visibility and color of the lines, and the position, format, and units of the labels. |
14 | 14 |
|
15 | 15 | ## How it works |
16 | 16 |
|
17 | 17 | 1. Create an instance of one of the `Grid` types. |
18 | 18 | 2. Grid lines and labels can be styled per grid level with `grid.lineSymbols[0]` and `grid.textSymbols[0]` subscripts on the grid. |
19 | | -3. The label position, format, unit and visibility can be specified with `labelPosition`, `labelFormat`, `labelUnit` and `isVisible` on the `Grid`. |
| 19 | +3. The label position, format, unit, and visibility can be specified with `labelPosition`, `labelFormat`, `labelUnit`, and `isVisible` on the `Grid`. |
| 20 | + * Note that as of 200.6, MGRS, UTM, and USNG grids in a SceneView only support the `geographic` label position. |
20 | 21 | 4. For the `LatitudeLongitudeGrid` type, you can specify a label format of `decimalDegrees` or `degreesMinutesSeconds`. |
21 | | -5. To set the grid, assign it to the map view using the `grid(_:)` modifier. |
| 22 | +5. To set the grid, assign it to the map view or scene view using the `grid(_:)` modifier. |
22 | 23 |
|
23 | 24 | ## Relevant API |
24 | 25 |
|
25 | 26 | * Grid |
26 | 27 | * LatitudeLongitudeGrid |
27 | 28 | * MapView |
28 | 29 | * MGRSGrid |
| 30 | +* SceneView |
29 | 31 | * SimpleLineSymbol |
30 | 32 | * TextSymbol |
31 | 33 | * USNGGrid |
|
0 commit comments