使用Google place API从拉特地区获取附近的地区

我正在使用谷歌的地方API即

https://maps.googleapis.com/maps/api/place/search/json?location=33.7167,73.0667&radius=500&type=funeral_home&sensor=false&key=AIzaSyDN1QX-gWUR-mIYo_D21PNFLHHpNQkIkGU 

上面的链接给我所有的特定types的附近位置。 即types=食物。 现在我会把他们各自的地址附近的所有咖啡馆和餐馆。 反正有,只能给我附近我的坐标(拉特,长)的地区或地方? 提前致谢。

我也有类似的用例。 我没有办法使用谷歌地图API来做到这一点。 但是,您可以尝试从Autocomplete getPlaces()获取几何(lat,lng),并使用geonames.org API获取附近的sublocalities,给出lat,lng和radius

http://api.geonames.org/findNearbyPlaceNameJSON?lat=13.041703&lng=80.251943&radius=5&username=demo

这对我工作:-)

阿伦,如果你可以给经度和经度值

  //MAP MKCoordinateRegion region; CLLocationCoordinate2D coordinate; //if you want to use the GET for getting response for MAP from that URL,you can use this coordinate.latitude = [[[Arrresult objectAtIndex:i]objectForKey:@"latitude"]doubleValue]; coordinate.longitude =[[[Arrresult objectAtIndex:i]objectForKey:@"longitude"]doubleValue] ; //or if you want to see the exact or nearest location just give like this coordinate.latitude = @"33.7167"; coordinate.longitude =@"73.0667"; region.center = coordinate; MKCoordinateSpan span; span.latitudeDelta = 0.2; span.longitudeDelta = 0.2; region.span = span; myannotation *annotation = [[myannotation alloc]init]; annotation.coordinate = coordinate; [annotation setTitles:areastring :countrystring]; [map setRegion:region animated:YES]; [map addAnnotation:annotation];