ios - geocode 2 or more locations at same time -
i trying locations multiple address strings.
i've used below code single string.
nsstring *addressstr = @"neeru'semporio,roadnumber36,venkatagiri,hyderabad,andhrapradesh,india"; //string after removing spaces [[clgeocoder new] geocodeaddressstring:orgin completionhandler:^(nsarray *placemarks, nserror *error) { if(!error) { clplacemark *placemark = [placemarks objectatindex:0]; nslog(@"%f",placemark.location.coordinate.latitude); nslog(@"%f",placemark.location.coordinate.longitude); nslog(@"%@",[nsstring stringwithformat:@"%@",[placemark description]]); } else { nslog(@"there forward geocoding error\n%@",[error localizeddescription]); } } ];
how 2 or more locations multiple address strings @ time. i.e., want individual lat long every individual string , after getting locations need run other code.
please help. in advance.
use instead https://maps.googleapis.com/maps/api/geocode/json?address=%@&key=%@
pass address esc_add
, create google api key using the google maps geocoding api
one more thing replace spaces " " "+"
example https://maps.googleapis.com/maps/api/geocode/json?address=neeru's+emporio,road+number+36,venkatagiri,hyderabad,andhra+pradesh,india&key=your_api_key
it work fine
Comments
Post a Comment