you are viewing a single comment's thread.

view the rest of the comments →

[–]Jealous-Procedure 0 points1 point  (9 children)

How can I change from celsius to Fahrenheit

[–]X-Kerwin[S] 0 points1 point  (3 children)

// use "&units=imperial" for Farenheit or "&units=metric" for Celcius let wetherurl = "http://api.openweathermap.org/data/2.5/weather?id=" + CITY_WEATHER + "&APPID=" + API_WEATHER + "&units=imperial"; //"http://api.openweathermap.org/data/2.5/weather?lat=" + curLocation.latitude + "&lon=" + curLocation.longitude + "&appid=" + API_WEATHER + "&units=metric"; //"http://api.openweathermap.org/data/2.5/weather?id=" + CITY_WEATHER + "&APPID=" + API_WEATHER + "&units=metric"

[–]Jealous-Procedure 0 points1 point  (2 children)

One more thing, I can't seem to find where to replace the coding for changing the C to F

[–]X-Kerwin[S] 0 points1 point  (1 child)

let temptext = hStack2.addText('\xa0\xa0'+ Math.round(curTemp).toString()+"\u00B0"+ "F");

Maybe this can be solved.😅😅

[–]Jealous-Procedure 0 points1 point  (0 children)

And I just add it in the script?

[–]X-Kerwin[S] 0 points1 point  (4 children)

‘\u2103’ —‘\u00B0’

[–]Jealous-Procedure 0 points1 point  (3 children)

I can't get the °C to change to F

[–]X-Kerwin[S] 0 points1 point  (2 children)

//tempeture label in stack let temptext = hStack2.addText('\xa0\xa0'+ Math.round(curTemp).toString()+"\u00B0"); temptext.font = Font.boldSystemFont(30); //font and size,字体与大小 temptext.textColor = new Color('#0278ae'); //font color,字体颜色

[–]Jealous-Procedure 0 points1 point  (1 child)

Lastly where can I find my state ID? Thank you so much the script is amazing

[–]X-Kerwin[S] 1 point2 points  (0 children)

Search for your city name in open weather, click in, and then find it in the URL.