Closed moollaza closed 7 years ago
I'll look into this issue.
@heytitle awesome, thanks!
Let us know if you run into any problems
@heytitle Those are really far from each other! We're working on a better fix for the weather relevancy, so that shouldn't come up next time.
After investigating, I found that the problem seems to come from DDG::Location
which transtate IP to postal code incorrectly as far as I can see.
REF: https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/Forecast.pm#L73
Requested from Bangkok, Thailand: 58.8.17.47
I've got the idea from where am i
goodie which return my location correctly.
I think if we change this line to
$location = $loc->latitude.','.$loc->longitude;
which propably solve the problem. Further more, I've tested my solution by sending lat,long to the api, which return me a satisfied result.
https://duckduckgo.com/js/spice/forecast/
I would be appreciated if you guys tell me how to make Forecast
spice work locally. I can't trigger it for some reason.
@russellholt it looks like we originally used the lat/long and then switched to the loc_str
(https://github.com/duckduckgo/zeroclickinfo-spice/commit/6b9dd4326678431c722a15d1e764b88d0220102f) -- do you remember what the reason was? Any thoughts on switching back?
@moollaza Do you have any ideas how to fix it?
it's a privacy leak to send lat,long.
@russellholt Isn't the lat-lon just as accurate as join(", "$loc->city, $loc->region_name, $loc->country_name);
? It doesn't really get the user's location--it gets the ISP's location.
@moollaza Seems like this is still an issue.
Confirming this is still an issue.
Where I am correctly states 'Buenos Aires', weather giving me weather for a little-known city called Federal some 1.000 kilometers north.
Closing. Duplicate of #899
From Duck.co, https://duck.co/forum/thread/7105/location-tracking-not-working
IA Page: https://duck.co/ia/view/forecast