我正在使用MAPBOX SDKForwardGeocodeOptions
在我的iOS
示例应用程序中实现。我正在呼吁获取地标。但总是只得到 10 个结果。我想获得至少 30 个或更多的结果。我怎样才能得到 ?
func getResults(){
let options = ForwardGeocodeOptions(query: "restaurant")
// options.allowedISOCountryCodes = ["IN"]
options.focalLocation = CLLocation(latitude: 17.4447496, longitude: 78.3136091)
options.allowedScopes = [.pointOfInterest,.all]
options.maximumResultCount = 50
let task = Geocoder.shared.geocode(options) {(placemarks, attribution, error) in
if let error = error {
NSLog("%@", error)
} else if let placemarks = placemarks, !placemarks.isEmpty {
print(" \(placemarks.count)")
}
}
task.resume()
}
内部调用此 API:-