This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const buildRequestUrl = (lat, lon) => { | |
const key = "b8a59b301233a16e12819fc3b17ebc57"; | |
let url = | |
"https://api.openweathermap.org/data/2.5/forecast?" + | |
"lat=" + | |
lat + | |
"&lon=" + | |
lon + | |
"&APPID=" + | |
key; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const key = "b8a59b301233a16e12819fc3b17ebc57"; | |
const showPosition = position => { | |
updateByGeo(position.coords.latitude, position.coords.longitude); | |
}; | |
export const updateByGeo = (lat, lon) => { | |
let url = | |
"https://api.openweathermap.org/data/2.5/forecast?" + | |
"lat=" + |