MCPcopy Create free account
hub / github.com/codemistic/Web-Development / onSuccess

Function onSuccess

Weather Forecast Webapp/js/script.js:31–35  ·  view source on GitHub ↗
(position)

Source from the content-addressed store, hash-verified

29}
30
31function onSuccess(position){
32 const {latitude, longitude} = position.coords;
33 api = `https://api.openweathermap.org/data/2.5/weather?lat=${latitude}&lon=${longitude}&units=metric&appid=${'de1400a8c4500ee4e0ebe2e706f9d077'}`;
34 fetchData();
35}
36
37function onError(error){
38 infoTxt.innerText = error.message;

Callers

nothing calls this directly

Calls 1

fetchDataFunction · 0.70

Tested by

no test coverage detected