Incorrect results with getCountry()
Closed this issue · 3 comments
wrabit commented
When I run the example code:
Geo::getCountry('GR')
->level(Geo::LEVEL_3)
->orderBy('population','DESC')
->limit(3)
->get();
I am getting: (same result no matter what I change the country to)
=> Illuminate\Database\Eloquent\Collection {#1987
all: [
Igaster\LaravelCities\Geo {#1986
id: 1909729,
parent_id: null,
name: "Banan Qu",
country: "CN",
a1code: "33",
level: "ADM3",
population: 29914000,
lat: "29.370790",
long: "106.734560",
timezone: "Asia/Shanghai",
},
Igaster\LaravelCities\Geo {#1985
id: 2293537,
parent_id: 11996449,
name: "Departement d' Abidjan",
country: "CI",
a1code: "93",
level: "ADM3",
population: 4707404,
lat: "5.416670",
long: "-4.033330",
timezone: "Africa/Abidjan",
},
Igaster\LaravelCities\Geo {#1984
id: 2988506,
parent_id: 2968815,
name: "Paris",
country: "FR",
a1code: "11",
level: "ADM3",
population: 4380654,
lat: "48.853390",
long: "2.348640",
timezone: "Europe/Paris",
},
],
}
Do you know why?
wrabit commented
Update: works if I use Geo::country('GR')..
ronlinet commented
I have the same problem. Why is this closed? Shouldn't be the documentation updated?
ronlinet commented
For those who run into this problem feel free to reuse the Geo collection from this post.