Hallo ich arbeite auf Google Map in meiner App, ich füge es perfekt hinzu und bekomme den aktuellen Standort. Ich habe eine Suchfunktion in Google Maps um den folgenden Code hinzugefügt.Wie zeigt man den Standort auf der Google-Karte an, die von uisearchbar gesucht wird?
- (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];
}
Wenn ich etwas auf Suchleiste gibt es mir Vorschläge für die Standorte. Jetzt möchte ich diesen Ort auf Google Map hinzufügen. das will ich machen.
Danke
du bekommst die locaton Koordinate –
nein bro ich bekomme nur Ortsname und Adresse –