Trixology

WeatherCat => WeatherCat General Discussion => Topic started by: senorwx on July 15, 2013, 06:34:07 PM

Title: Display of both C and F
Post by: senorwx on July 15, 2013, 06:34:07 PM
 I'm in Mexico with local nationals, U.S. and Canadian citizens relying on my site. I'd like to display my WC data with metric and english readings...either both at once, or give the viewer the option to switch between the two.

Any ideas?

 [sweat]
Title: Could convert with JavaScript (Re: Display of both C and F)
Post by: elagache on July 15, 2013, 09:28:55 PM
Dear SenorWX and WeatherCat fans,

I'm in Mexico with local nationals, U.S. and Canadian citizens relying on my site. I'd like to display my WC data with metric and english readings...either both at once, or give the viewer the option to switch between the two.

I've also suggested this because we have relatives in France who might enjoy knowing what the weather is here in California.  For them, I pointed them to my Weather Underground page which does all that sort of converting for you.  However, I assume that isn't what you want.

I assume this will eventually make it onto Stu's to-do list, but I think demand isn't every high for it, so it might not get implemented very soon.

If you are willing to put some effort into your website, you could instead do the conversions on the website itself using JavaScript.  It isn't that complicated because the math is very elementary.  Alas, I couldn't find any examples on the web and I don't have the time to come up with this right now.  Could someone else come up with a quickie JavaScript example?

Cheers, Edouard  [cheers1]

Title: Re: Display of both C and F
Post by: ELO on July 16, 2013, 03:10:03 AM
Another relatively easy solution is to implement the Steel Gauges javascript files and display for your site. They allow users to select either ?F or ?C along with different pressure & wind units for display as well as to easily switch between them. See my site at wx.oshlo.net as one of many examples out there.

Rick
 
Title: Re: Display of both C and F
Post by: senorwx on July 17, 2013, 09:57:50 PM
Thanks! Nor could I find a javascript for this online...but I think I may go with Elo's approach below!

http://athena.trixology.com/Smileys/default/sun_emoticon.png