ios - Get GMSAddress from GMSPlace placeID -
is there way gsmaddress
placeid. interested in getting address using placeid
obtained autocompletequery
method.
p.s: have placeid
, finding way corresponding gmsaddress
in ios.
i found thread here not help.
thanks,
after autocomplete, place up, pass coordinates gmsgeocoder retrieve details, still missing street_name , street_number.
cllocationcoordinate2d addresscoordinates = cllocationcoordinate2dmake(latitude,longitude); gmsgeocoder* coder = [[gmsgeocoder alloc] init]; [coder reversegeocodecoordinate:addresscoordinates completionhandler:^(gmsreversegeocoderesponse *results, nserror *error) { if (error) { nslog(@"error %@", error.description); } else { gmsaddress* address = [results firstresult]; nslog(@"thoroughfare %@",address.thoroughfare); nslog(@"locality %@",address.locality); nslog(@"sublocality %@",address.sublocality); nslog(@"administrativearea %@",address.administrativearea); nslog(@"postalcode %@",address.postalcode); nslog(@"country %@",address.country); nslog(@"lines %@",address.lines); } }];
i'm thinking of switching ios's own reverse geocoder.
[clgeocoder reversegeocodelocation:[[cllocation alloc] initwithlatitude:latitude longitude:longitude] completionhandler: ^(nsarray* placemarks, nserror* error) {
Comments
Post a Comment