yekimov

AGSLocatorTask ignores AGSGeocodeParameters.minScore

Discussion created by yekimov on Jun 6, 2017
Latest reply on Jun 20, 2017 by yekimov

        let params = AGSGeocodeParameters()

        params.maxResults = 100

        params.resultAttributeNames = ["*"]

        params.outputSpatialReference = mapView?.spatialReference

        params.searchArea = mapView?.visibleArea?.extent

        params.minScore = 95

        cancelable = locatorTask.geocode(withSearchText: searchText, parameters: params) { [weak self] results, error in

        for result in results {

            log.error("result score = \(result.attributes?["Score"])")

        }

        }

I am using the code above to get matched [AGSGeocodeResult]. And I see:

 

❤️ ERROR | 2017-06-06 18:31:08.9130 |  result score = Optional(95.5)

❤️ ERROR | 2017-06-06 18:31:08.9150 |  result score = Optional(94)

❤️ ERROR | 2017-06-06 18:31:08.9180 |  result score = Optional(94)

❤️ ERROR | 2017-06-06 18:31:08.9200 |  result score = Optional(92.8)

❤️ ERROR | 2017-06-06 18:31:08.9220 |  result score = Optional(92.8)

❤️ ERROR | 2017-06-06 18:31:08.9230 |  result score = Optional(92.8)

So it's probably an issue with AGSLocatorTask? And what is default value for the AGSGeocodeParameters.minScore parameter?

Outcomes