こんにちは私は私のアプリでGoogleマップ上で作業しています、私はそれを完全に追加し、現在の場所を取得します。私は次のコードでGoogleマップに検索機能を追加しました。uisearchbarで検索するGoogleマップの場所を表示するには?
- (void)viewController:(GMSAutocompleteViewController *)viewController
didAutocompleteWithPlace:(GMSPlace *)place {
// Do something with the selected place.
NSLog(@"Place name %@", place.name);
NSLog(@"Place address %@", place.formattedAddress);
NSLog(@"Place attributions %@", place.attributions.string);
[self dismissViewControllerAnimated:YES completion:nil];
}
- (void)viewController:(GMSAutocompleteViewController *)viewController
didFailAutocompleteWithError:(NSError *)error {
// TODO: handle the error.
NSLog(@"error: %ld", (long)[error code]);
[self dismissViewControllerAnimated:YES completion:nil];
}
// User canceled the operation.
- (void)wasCancelled:(GMSAutocompleteViewController *)viewController {
NSLog(@"Autocomplete was cancelled.");
[self dismissViewControllerAnimated:YES completion:nil];
}
私は検索バーに何かを入力すると、それは私の場所のための提案を提供します。今私はその場所をGoogleマップに追加したいと思います。それは私がしたいことです。
は
私はロカトン座標を取得します –
仲間私は場所と名前だけを取得しています –