open weather map
-
[weather_app_5] api에서 정보를 가져와서 적용하기프로젝트/[react]weather_app 2018. 4. 29. 16:04
사용할 날씨 api => openWeatherMap https://openweathermap.org/api Current weather data 를 subscribe가입해야함. key를 얻자const API_KEY = "apiKey" api doc (https://openweathermap.org/current)By geographic coordinatesAPI call:api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon} _getWeather = (lat, lng) => { fetch(`http://api.openweathermap.org/data/2.5/weather?lat=${lat}&lon=${lng}&APPID=${API_KEY}`) .the..