geocoder-php / geocoder-php/Geocoder

open-cage-provider issue with adminLevels

Open
#1,040 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
4k
Forks
525
Avg merge
8m
Merged PRs (30d)
1

Description

In some cases provider don't return any adminLevels (empty list), but they should be there.
As example, if we try to reverse point (47.571109, 19.108676) we get address
"Budapest, Pajtás utca 2, 1046, Hungary"
without admin levels in parsed object.
But in original JSON response we have component item:
"region": "Central Hungary"
As I think, Regions should be admin level = 1.

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

Reproduce the reverse lookup for (47.571109, 19.108676) and compare the parsed object with the original OpenCage JSON, focusing on how the provider handles adminLevels. Done means the region component "Central Hungary" is exposed as admin level 1 and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.