Skip to content

Call to undefined method Geocoder\Provider\ChainProvider::setMaxResults() #241

@dinglidingli

Description

@dinglidingli

Hello,

I'm currently getting the error:

Call to undefined method Geocoder\Provider\ChainProvider::setMaxResults()

Referencing the line beginning with $provider = ... when I try and reverse geocode some coordinates. It is line 121 of /willdurand/geocoder/src/Geocoder/Geocoder.php:

    public function reverse($latitude, $longitude)
    {
        if (empty($latitude) || empty($longitude)) {
            // let's save a request
            return $this->returnResult(array());
        }

        $provider = $this->getProvider()->setMaxResults($this->getMaxResults());
        $data     = $provider->getReversedData(array($latitude, $longitude));
        $result   = $this->returnResult($data);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions