Skip to content

Commit fdc5d65

Browse files
committed
Update readme.
1 parent 2e651fd commit fdc5d65

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Shared/Samples/Find address with reverse geocode/FindAddressWithReverseGeocodeView.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ struct FindAddressWithReverseGeocodeView: View {
6666
.alert(isPresented: $errorAlertIsShowing, presentingError: error)
6767
}
6868

69-
/// Reverse geocodes a given point and updates the callout with the result.
69+
/// Reverse geocodes a given point and updates the marker with the result.
7070
/// - Parameter mapPoint: The point on the map to reverse geocode.
7171
private func reverseGeocode(_ mapPoint: Point) async {
72-
// Normalized the tap location.
72+
// Normalized the map point.
7373
guard let normalizedPoint = GeometryEngine.normalizeCentralMeridian(
7474
of: mapPoint
7575
) as? Point else { return }
@@ -108,7 +108,7 @@ struct FindAddressWithReverseGeocodeView: View {
108108
}
109109

110110
private extension FindAddressWithReverseGeocodeView {
111-
/// The view model for the sample.
111+
/// The model used to store the geo model and other expensive objects used in this view.
112112
class Model: ObservableObject {
113113
/// A map with a topographic basemap initially centered on Redlands, CA, USA.
114114
let map = {
@@ -123,7 +123,7 @@ private extension FindAddressWithReverseGeocodeView {
123123
/// The graphics overlay for the marker graphic.
124124
let graphicsOverlay = GraphicsOverlay()
125125

126-
/// The red map marker graphic used to indicate a given location on the map.
126+
/// The red map marker graphic used to indicate a tap location on the map.
127127
let markerGraphic = {
128128
// Create a symbol using the image from the project assets.
129129
guard let markerImage = UIImage(named: "RedMarker") else { return Graphic() }

Shared/Samples/Find address with reverse geocode/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ Tap the map to see the nearest address displayed in a callout.
1515
## How it works
1616

1717
1. Create a `LocatorTask` object using a URL to a geocoder service.
18-
2. Set the `GeocodeParameters` for the `LocatorTask` and specify the geocoder's attributes.
19-
3. Get the matching results from the `GeocodeResult` using `LocatorTask.reverseGeocodeAsync`.
18+
2. Create an instance of `ReverseGeocodeParameters` and set `ReverseGeocodeParameters.maxResults` to 1.
19+
3. Pass the `ReverseGeocodeParameters` into `LocatorTask.reverseGeocode(forLocation:parameters:)` and get the matching results from the `GeocodeResult`.
2020
4. Show the results using a `PictureMarkerSymbol` and add the symbol to a `Graphic` in the `GraphicsOverlay`.
2121

2222
## Relevant API
2323

24-
* GeocodeParameters
24+
* GeocodeResult
2525
* LocatorTask
2626
* ReverseGeocodeParameters
2727

Shared/Samples/Find address with reverse geocode/README.metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
"locate",
1212
"reverse geocode",
1313
"search",
14-
"GeocodeParameters",
14+
"GeocodeResult",
1515
"LocatorTask",
1616
"ReverseGeocodeParameters"
1717
],
1818
"redirect_from": [],
1919
"relevant_apis": [
20-
"GeocodeParameters",
20+
"GeocodeResult",
2121
"LocatorTask",
2222
"ReverseGeocodeParameters"
2323
],

0 commit comments

Comments
 (0)