File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -44,18 +44,22 @@ vc.delegate = self;
4444Implement `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
6165The main geocoder class is Geocoder in Swift or GoongGeocoder in Objective-C. Create a geocoder object using your access token:
You can’t perform that action at this time.
0 commit comments