Skip to content

Commit 78f5cd8

Browse files
author
iBinh
committed
update README
1 parent 2dd3b13 commit 78f5cd8

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,22 @@ vc.delegate = self;
4444
Implement `GoongAutocompleteDelegate`, this delegate method called when user tap on a place in tableView:
4545
4646
```swift
47-
func didSelectPlacemark(_ placemark: Placemark?) {
48-
print(placemark.location)
47+
public func viewController(_ viewController: GoongAutocompleteViewController, didAutocompleteWith place: Placemark?) {
48+
print(place?.name)
49+
print(place?.location)
4950
}
5051
```
51-
52-
```objc
53-
- (void)didSelectPlacemark:(GoongPlacemark *)placemark{
54-
NSLog(placemark.location);
52+
Handle error:
53+
```swift
54+
public func viewController(_ viewController: GoongAutocompleteViewController, didFailAutocompleteWithError error: Error?) {
55+
print(error?.localizedDescription)
5556
}
5657
```
5758

5859

60+
```
61+
62+
5963
### Basics
6064
6165
The main geocoder class is Geocoder in Swift or GoongGeocoder in Objective-C. Create a geocoder object using your access token:

0 commit comments

Comments
 (0)