1

是否有任何可用的 API 服务可以从 Google Maps ios sdk 内部调用,就像GMSAutocompleteFilter一样?

GMSAutocompleteFilter *filter = [[GMSAutocompleteFilter alloc] init];
    filter.type = kGMSPlacesAutocompleteTypeFilterCity;

    [_placesClient autocompleteQuery:@"Sydney Oper"
                              bounds:nil
                              filter:filter
                            callback:^(NSArray *results, NSError *error) {
                              if (error != nil) {
                                NSLog(@"Autocomplete error %@", [error localizedDescription]);
                                return;
                              }

                              for (GMSAutocompletePrediction* result in results) {
                                NSLog(@"Result '%@' with placeID %@", result.attributedFullText.string, result.placeID);
                              }
                            }];

我知道使用它https://maps.googleapis.com/maps/api/directions/json?origin=%@&destination=%@&key=%@我可以实现和检索响应。但问题是此 URL 不返回仅在最新的Google Maps Directions Service Javascript API中可用的overview_pathlat_lngs

4

0 回答 0