geocoder-php / geocoder-php/Geocoder

Algolia provider returning empty results.

Open
#1,023 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs more info provider
Dominant language
PHP
Stars
4k
Forks
525
Avg merge
8m
Merged PRs (30d)
1

Description

Asking on behalf of @tanthammar, who posted this issue here: https://github.com/geocoder-php/GeocoderLaravel/issues/163


General Information

GeocoderLaravel Version: ^4.2
Laravel Version: 6
PHP Version: 7.3.8
Operating System and Version: OSX 10.14.6

Issue Description

I do understand that this might not be the proper place to ask, but I was hoping that someone might have a solution. :)

Unable to get this to work with the Algolia geocoder provider
No errors, but always an empty collection returned.

(I have it working with the Nominatim and GoogleMaps)

Steps to Replicate
composer require geocoder-php/algolia-places-provider^0.1.1

in config/geocoder.php

'providers' => [
        Chain::class => [
            AlgoliaPlaces::class => [
                'my-api-key',
                'my-app-id'
            ],
            Nominatim::class => [
                'https://nominatim.openstreetmap.org',
                'en'
            ],
            GoogleMaps::class => [
                env('GOOGLE_MAPS_LOCALE', 'en-US'),
                env('GOOGLE_MAPS_API_KEY'),
            ],
            GeoPlugin::class  => [],
        ],
    ],
Stack Trace

[if an error is occuring, provide the complete stack trace here]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported setup with PHP 7.3.8, Laravel 6, GeocoderLaravel ^4.2, and geocoder-php/algolia-places-provider^0.1.1, using the providers configuration in config/geocoder.php. Compare the AlgoliaPlaces result with the working Nominatim and GoogleMaps providers; done means the Algolia provider returns expected geocoding results or the incompatibility is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.