ios - extracting street name using reverse geocoding (Google API) -


i'm using google reverse geocoding user's current location. code goes this:

    nsstring* strcurrentlongitude=[nsstring stringwithformat: @"%f", currentlocation.coordinate.longitude]; // string value      nsstring* strcurrentlatitude=[nsstring stringwithformat: @"%f", currentlocation.coordinate.latitude];      [nsurl urlwithstring:[nsstring stringwithformat:@"http://maps.googleapis.com/maps/api/geocode/json?latlng=%@,%@&sensor=true_or_false",strcurrentlatitude,strcurrentlongitude]]; 

now how continue here user's current location?

of top of head:

[nsurlconnection sendasynchronousrequest:[nsurlrequest requestwithurl:yoururl] queue:[nsoperationqueue mainqueue] completion:^(nsurlresponse *r, nsdata *d, nserror *e) {     //decode     id json = [nsjsonserialization jsonobjectwithdata:d options:0 error:nil];       //process google response, json iirc }]; 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -