Page 1 of 2

Is there an autodetect value for the unit+system parameter?

Posted: Sun Feb 06, 2011 6:10 am
by jackaroo
I am planning to use the widget on my site. I want my visitors to see their weather in their location and of course use the unit_system of their country. Basically it is always metric except in the US and a few very small countries. From the documentation I see that the allowed values for the widget are "us" or "metric". Is there an undocumented value of "auto" or something similar, which would choose the proper unit system generally in use in that country?

Re: Is there an autodetect value for the unit+system paramet

Posted: Sun Feb 06, 2011 7:01 am
by Don
jackaroo,
Remove the unit_system parameter and YoWindow will use your visitors' IP address to determine which unit system to use.

Don

Re: Is there an autodetect value for the unit+system paramet

Posted: Mon Feb 07, 2011 5:05 am
by jackaroo
Don,

Thank you very much for the information. You saved me a lot of work. I was already looking into using my own geolocation code.

Jackaroo

Re: Is there an autodetect value for the unit+system paramet

Posted: Mon Feb 07, 2011 4:36 pm
by jackaroo
Don,

Me again. I used your suggestion on my website (i.e. remove the unit_system parameter), and I had a few people from Canada check. They saw units in farenheit; in Canada it should be Celsius. The city was ok but not the units.

jackaroo

Re: Is there an autodetect value for the unit+system paramet

Posted: Mon Feb 07, 2011 7:19 pm
by Don
jackaroo wrote:Don,

Me again. I used your suggestion on my website (i.e. remove the unit_system parameter), and I had a few people from Canada check. They saw units in farenheit; in Canada it should be Celsius. The city was ok but not the units.

jackaroo
Maybe YoWindow uses Fahrenheit for all of North America. :? Perhaps Pavel can answer that one for us :?:

If you could post a link to your YoWindow page maybe some of our friends from other countries could have look and tell us what they see. Any volunteers? :)

Don

Re: Is there an autodetect value for the unit+system paramet

Posted: Mon Feb 07, 2011 7:34 pm
by ikarus1969
Don wrote:Any volunteers? :)
Me, me! Gimme the website to check units! :)

Re: Is there an autodetect value for the unit+system paramet

Posted: Mon Feb 07, 2011 8:14 pm
by Don
ikarus1969 wrote:Me, me! Gimme the website to check units! :)
You can check my site if you want. http://home.surewest.net/donjr/yowindow ... r_six.html
jackaroo has me wondering if this feature works the way I think it does.

Re: Is there an autodetect value for the unit+system paramet

Posted: Mon Feb 07, 2011 8:22 pm
by ikarus1969
Don wrote:
ikarus1969 wrote:Me, me! Gimme the website to check units! :)
You can check my site if you want. http://home.surewest.net/donjr/yowindow ... r_six.html
jackaroo has me wondering if this feature works the way I think it does.
i'm sorry, neither location nor units are ok for my city (vienna, metric) :(

Re: Is there an autodetect value for the unit+system paramet

Posted: Mon Feb 07, 2011 8:32 pm
by Leif
ikarus1969 wrote: i'm sorry, neither location nor units are ok for my city (vienna, metric) :(
Same here (UmeƄ, Sweden - metric)

Re: Is there an autodetect value for the unit+system paramet

Posted: Mon Feb 07, 2011 8:38 pm
by FvE
Hi Jackaroo,

Just to let you know:

Location was detected right for me (Mijdrecht, Netherlands), but the units should be metric.
It showed me Fahrenheit instead.

I'm sorry, but I don't know if and how this can be changed.

Goodluck,
Fred