-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Main city in Norway without result. #7
Comments
The first argument is the longitude and the second argument is the latitude. You switched them. |
Oh that is just in the example. Sorry. Some places near the coast are still not detected. |
Maybe this happens happens because of limited precision in the polygon file? That seems to me like a logical explanation. |
@RobinvanderVliet You are probably right yes. Right now I have fallback code to do a online lookup if the result is empty. Works okay, but I would love to have a 100% offline solution. |
I just tried it with a location in the Netherlands very close to the German border, and I received "DE" as a result. |
Try this: //around Stavanger, Norway
var_dump(\DaveRoss\OfflineCountryReverseGeocoder\get_country(5.641784, 59.037492));
var_dump(\DaveRoss\OfflineCountryReverseGeocoder\get_country(5.739792, 58.971404));
//in Sweden, near the border with Norway
var_dump(\DaveRoss\OfflineCountryReverseGeocoder\get_country(11.262722, 59.095614));
var_dump(\DaveRoss\OfflineCountryReverseGeocoder\get_country(11.265855, 59.093015)); |
\DaveRoss\OfflineCountryReverseGeocoder\get_country(5.7324723,58.9696274)
This is in the center of one of the major cities in Norway, without any result.
The text was updated successfully, but these errors were encountered: