강의

멘토링

커뮤니티

Inflearn Community Q&A

dfsa3565806's profile image
dfsa3565806

asked

[Code Camp] Highly concentrated backend course created at boot camp

▶ openWeatherMap API

섹션2-8 openWeatherMap API

Resolved

Written on

·

271

1

 const weatherSearch = function (position) { const openWeatherRes = fetch( `https://api.openweathermap.org/data/2.5/onecall?lat=${position.latitude}&lon=${position.longitude}&appid=4bdfd4f45f4d597908e29058919e8707` ); console.log(openWeatherRes); }; const accessToGeo = function (position) { const positionObj = { latitude: position.coords.latitude, longitude: position.coords.longitude, }; weatherSearch(positionObj); }; const askForLocation = function () { navigator.geolocation.getCurrentPosition(accessToGeo, (err) => { console.log(err); }); }; askForLocation();

 

fetch 안에 2.5로 변경해도 계속 오류가 떠요 ㅠ

어떻게 해야하나요?

javascriptnode.jsexpressdockertddrest-apinestjs

Answer 1

0

nwd09074926님의 프로필 이미지
nwd09074926
Instructor

안녕하세요! 소진님!

동일한 질문에 대한 답변이 기존에 존재하여, 링크를 보내드립니다!
아래 링크를 확인해 주세요!

https://www.inflearn.com/questions/886308

dfsa3565806's profile image
dfsa3565806

asked

Ask a question