A few questions. Sorry. #237

Open
HHawk opened this Issue Apr 22, 2016 · 4 comments

Projects

None yet

4 participants

@HHawk
HHawk commented Apr 22, 2016

First; thank you for this wonderful weather script. I have used and purchased several ones, but all seem to lag for my personal browser starting page. Your's is by far the fastest. Awesome job.

Now I am sorry if I am going to ask stupid questions, but I am no developer so I don't understand it all.

Question 1
It currently shows the forecast days in English, is there a way to change them to a different language? Or replace them?

Question 2
Is it possible to also get a forcast weather image? I tried a few things, but it won't work. It even stops loading the weather completely, so clearly I am doing something wrong, but no clue what. Here is an example of what I am currently using:

html += '<p>'+weather.forecast[1].day+': <i class="weerklein icon-'+weather.forecast[1].code+'"></i> min. '+weather.forecast[1].low+' max. '+weather.forecast[1].high+'</p>';

Question 3
Wind speed, in my case shown as km/h, is always with 2 numbers behind the dot. For example: 22.53 km/h. I want it to display 23 km/h (rounded) instead. If this is possible; it would save me some space.

Question 4
Is it possible to use wind direction icons/images instead of letters? If yes, please explain how or point me in the right direction.

Question 5
Does or can your excellent script support these Weather Icons: http://erikflowers.github.io/weather-icons/ ?
Reason for asking is, is that it also has icons for wind direction, thermometer, sunrise, sunset and much more.No clue if this is possible, just wondering. I gave it a few goes, but no luck. I am guessing it's not possible.

Sorry for all these questions. And probably some of them are pretty stupid. So if you don't feel like answering, no worries. :)

Thanks in advance.

Regards

@fleeting
Member
  1. Yahoo only returns English so you would need to handle the translation on your end.
  2. By default simpleWeather doesn't include weather icons, I just use a set for the demo. I would need to see a better example and which icons you are trying to use.
  3. Yeah, you can use Math.round(). See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round for details.
  4. It's possible, you would need to add a class for each wind direction and assign an icon to that. Same as you would do for the weather. You can see a simple example on the main simpleWeather demo.
  5. The site says it has support and works with Yahoo's API and I believe others have used it without problems. I haven't so not entirely sure.
@LostWelshman

Sorry for hijacking this thread but it was the most general and my point didn't warrant it's own thread...
Which is that the testing i've done for my location "Milford Haven, UK", I get 9 days worth of forecasts not 4. Is it location dependant perhaps or maybe Yahoo have upped it? I was just wondering what other users have found.
Also, thanks from me too, a fab script indeed!
Pete

@fleeting
Member
fleeting commented May 6, 2016

I believe Yahoo recently (a few weeks, maybe more?) added more days to the forecast.

@hariskhan10

Do we have something for time display depending on the location ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment