I am implementing ForwardGeocodeOptions in my iOS sample app using MAPBOX SDK. And I am making a call for getting Placemarks. But always getting 10 results only. I want to get minimum 30 results or more than that. How can I get ?
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()
}
Internally calling this API :-