Comments (4)
A PR (#1174) is ready that should solve this issue!
{
"results" : [
{
"address_components" : [
...
{
"long_name" : "Wayaux",
"short_name" : "Wayaux",
"types" : [ "political", "sublocality", "sublocality_level_1" ]
},
{
"long_name" : "Les Bons Villers",
"short_name" : "Les Bons Villers",
"types" : [ "political", "sublocality", "sublocality_level_1" ]
},,
...
],
"formatted_address" : "Rue de Pont-à-Migneloux, 6210 Les Bons Villers, Belgique",
...
}
],
"status" : "OK"
}
In this case, it will combine the 2 sublocality_level_1
and return Wayaux / Les Bons Villers
as SubLocality Level 1 (see tests).
from geocoder.
Nice, thank you
from geocoder.
Released: https://packagist.org/packages/geocoder-php/google-maps-provider#4.7.1
from geocoder.
hey guys
this bug is still hapenning.
Just try to reverse these coordinates:
$lat = 22.63376;
$lng = 88.4147;
It will throw Geocoder\Exception\InvalidArgument
"Administrative level 3 is defined twice".
Because the address JSON contains:
{
"long_name" : "NDDM Ward No - 26",
"short_name" : "NDDM Ward No - 26",
"types" :
[
"administrative_area_level_3",
"political"
]
},
{
"long_name" : "North 24 Parganas",
"short_name" : "North 24 Parganas",
"types" :
[
"administrative_area_level_3",
"political"
]
},
And your fix doesn't help. Because the exception is thrown before withSubLocalityLevels()
call.
Any ideas how to fix it?
UPD in my local fork I've just removed this exception: lumiform/geocoder-php-common@2ce26bd
It causes that the duplicate levels are ignored.
from geocoder.
Related Issues (20)
- Clean wrong tag/release created by @JaZo HOT 5
- Unable to install providers HOT 4
- Always get the address id HOT 3
- Arcgis Provider HOT 3
- Static Maps HOT 1
- [Nominatim] Neighbourhood field HOT 1
- Serialization of 'Closure' is not allowed HOT 7
- Store Address In Database HOT 10
- Equivalent to NoResult Exception when updating from older versions HOT 2
- sublocality allways null HOT 8
- Tag new release HOT 1
- Abandoned dependency php-http/message-factory
- Reverse Geocode failure - Here maps - Undefined index: LocationId HOT 2
- Error installing geocoder-php/nominatim-provider HOT 8
- Documentation to create custom providers
- Google invalid response HOT 4
- Issues with PHP 8.1 during installation HOT 2
- Take exception message from provider response in case of statusCode >= 400
- Tag new release HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geocoder.