Skip to content
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

'weather/{lat,long}' broke sometimes #10

Closed
semir4in opened this issue Aug 1, 2022 · 3 comments
Closed

'weather/{lat,long}' broke sometimes #10

semir4in opened this issue Aug 1, 2022 · 3 comments
Labels
possible-bug The issue is possibly a bug but needs either more information or additional investigation.

Comments

@semir4in
Copy link

semir4in commented Aug 1, 2022

Hello. thank you for making non-api-key db in advance. I'm so glad that I can embed weather tab in my app so easily.

Describe the bug
I got lat,long from chrome locator and tried get response weatherdbi:

// in javascript
const longitude = position.coords.longitude; // chrome function
const latitude = position.coords.latitude; // chrome function
const url = `https://weatherdbi.herokuapp.com/data/weather/${latitude},${longitude}`;

but I got failed response with the location nearby my home. After that day, I checked the same code in other place and got the right response. So, for more infomation, I checked these regions in google map that they are indicating certain place in South Korea. And here's the things..

To Reproduce
Four examples with very small changes ~ 0.1 changes in longitude:

It doesn't seem to work in certain sections. It's a difficult problem to guess because I can't look inside the code. Can you figure it out? If you can catch the reason, please fix it for useful weather database 😎

@semir4in semir4in added the possible-bug The issue is possibly a bug but needs either more information or additional investigation. label Aug 1, 2022
@SGtOriginal
Copy link

SGtOriginal commented Aug 1, 2022

See this comment by the owner. Could be related to that.

@DB-db-dron
Copy link
Owner

DB-db-dron commented Aug 1, 2022

127.171824 => 127 degrees, 10 minutes, 18.5664 seconds

127.071824 => 127 degrees, 4 minutes, 18.5664 seconds

In the present implementation, the coordinates work at locality level precision (that is - local area name inside a city). But the processing of your invalid coordinates 37.407812,127.071824 gives back locality name as 13452 which I think is the postal code. A similar observation was recorded for the other invalid query.

This is happening due to the third-party service that we use for our API, hence cannot be fixed somehow. The locality name is important for further processing, but its being a number causes this issue.

If you have any query, always eager to help...

@semir4in
Copy link
Author

semir4in commented Aug 5, 2022

It's a little sad that the unwanted transformation is happening at 3rd party. If I can change the coordinates to a city name, this problem can be solved easily.
Thank you for your kind reply. Have a good weekend!

@semir4in semir4in closed this as completed Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible-bug The issue is possibly a bug but needs either more information or additional investigation.
Projects
None yet
Development

No branches or pull requests

3 participants