Weather Display Live for the iPhone and Android

Looks very nice Sietse, 8)
Here is an updated language file with the new items/fatures translated (to Swedish)

Thanks
/Labbs


iwdl_lang_se.js.txt (7.36 KB)

Hi again

Ups forgot to attached my updated Danish language file

Best regards,

Henrik


iwdl_lang_dk.js.txt (7.27 KB)

Hi Sietse,

thank you for new version! I only have one problem with Forecast. - It’s something with using diacritical letters in location name.
For instance, this address works on iPhone fine (I’m getting forecast):
http://www.yr.no/place/Czech_Republic/Moravia-Silesia/Opava/
But this address is not working on iPhone:
[url=http://www.yr.no/place/Czech_Republic/Moravia-Silesia/Brunt

Hi Sietse,

This is really great! :smiley: I have it up and running (with radar and web cam) here:

www.runarweb.com/iwdl

I have only one question: As you see the web cam picture is a little large. Is it anything to do with that without reducing the size of the original picture (I know that I can scroll)?

I have a new complete Norwegian language file here:


iwdl_lang_no.js.txt (7.63 KB)

[quote author=vit_kopacek link=topic=43872.msg357324#msg357324 date=1263555504]
Maybe the problem with station name Brunt

I think you will have to setup a special page on your site for the iphone (or smartphone in general) with a smaller picture.
The radar and webcam are loaded in an iframe, iwdl cannot control contents in the iframe, you will have to make sure to serve it suitable content.

Sietse

[quote author=vogon1 link=topic=43872.msg357328#msg357328 date=1263560406]
Please try replacing in iwdl_settings.js the

Thanks Sietse for your quick support and the latest version. I have the radar, webcam and forecast up and running at
http://gavinf.no-ip.com/~Gavin/iwdl/#home
Regards
Gavin

Sietse,

I’m not able to run Norwegian and English version on the same iPhone. I have set up a Norwegian version here (Norwegian language and metric units) :

www.runarweb.com/iwdl

and an English version here (English language and US units):

www.runarweb.com/iwdl_e

When running the Norwegian version, everything is fine. If I exit that and start the English version, I get US units but Norwegian language. The strange thing is at startup I see the main screen in English for 0,5 seconds, then it turns Norwegian. That happens each time. I have deleted cookies etc., but still the same.

If I enter Settings, units are US and language is Norwegian. Then I change it to English and everything is fine each time I start the application.

That is until I try the Norwegian version again. There the units are metric now but language is English! (I see Norwegian texts 0,5 seconds at startup).

Do you have any idea what happens?

NB: I tried Firefox on my PC, aqnd there I have NO PROBLEM!

Yes, that is a feature, not a bug. Really.

One of the drives for me to create this application is to develop my javascript skills, and to make sure no server side scripting is required. Not even cookies.
The early versions of iWDL only had settings in iwdl_settings.js; later on I added a settings screen in the application. The settings should persist across sessions, and HTML5 has a feature for that: HTML5 databases. Safari supports this.

So, how does it work?
When a new user visits iWDL on a particular site, say runarweb.com, it does not have settings for this site in the HTML5 database. The settings of iwdl_settings.js will be used. If the user does not change any setting, the database will stay empty. So, if you have an english and a norwegian site with its own settings, switching between iwdl and iwdl_e wil indeed change language because the HTML5 database for iwdl is empty.

Now, the user changes the language to Dutch. Clearly, the user has a preference for that. The setting will be true for the whole site runarweb.com (that is the way I implementated it). So, even when switching from iwdl to iwdl_e, the language will stay Dutch, because it overrules the default setting. That is what the user wanted. The same is true for all other settings.

You can throw away the HTML5 database on your iPhone. Go to Settings → Safari → Databases; find www.runarweb.com, database iwdl. In the toolbar, tap Change, now you can delete the iwdl database.

Firefox does not support HTML5 databases, so in my javascript code, I ignore this database stuff. That also means that settings are not preserved between sessions. If I select Dutch using Firefox, and I restart firefox, the language will be back to whatever the default is in iwdl_settings.js.

I just love using new techniques :wink:

Sietse

Just a heads up: I got it working in development.
There is another thing I have to figure out, someone else seems to use another codepage when editing the iwdl_settings.js file.
Instead of Z

For editing iwdl_settings.js file I’m using TextWrangler on Mac and the file is saved after editing in encoding Unicode (UTF-8) because I use diacritical letters in “station-name” and “location”.

Version 0.8a is now the latest; language files are updated, and the diacriticals fix for yr.no citynames is in.

Download as usual: http://sietse.net/iwdl-latest.tar.gz

Sietse

Thanks for all the new features, I specially love the weather forcast from yr.no, very nicely displayed, and the forcats are good too, at least for us here in Norway. I have found the Norwegian weather radar at met.no (http://met.no/English/) wich is the Norwegian Meteorological Institute. However the size of the picture is a bit to large, and I do not see how I can fix that?

Just one thing, when I add a measurement on the Home screen, (in Temp wich is very relevant to me since the weather station is at my cabin far up in the mountains) a new line is added and then the menu in the bottom goes partially out of the screen, even dough there is enough free space on the screen as is.

Just missing the records for month, year and total now, then it is perfect! Other plans?

Hi Sietse,
in version 0.8a is forecast with diacritical letters in location name working perfectly! :smiley: Thank you for your work and I’m looking forward to new functions in new versions of iWdl. - For me would be very nice to see max/min for month/year/total and to display information about snow (snow fall for today/this month/this season and current snow depth) from clientraw data.

Hi, I have tried to change the coordinates of js.setting.
But it will still forward Ekeby on the map,
(it’s coordinates from clientraw file 56, 13).

// Location name override; iWDL normally uses the coordinates from clientraw.txt.
// In case you want another location to show up in the map screen, remove // in the following line:
 settings["location"] = "Stenestad, SE";

// Next settings only needed if lat/long is not in your clientraw.txt; below are coordinates in Netherlands
// Negative values for east of Greenich and southern hempisphere
 settings["longitude"] = "-13.1019";
 settings["latitude"]  = "53.0532";


Regards
Bertil


korrdinat.jpg

That is correct, if it is in clientraw, it will take that; why not fill the coordinates correctly in Weather Display?

Sietse

Good to hear.
min/max for day/month/year/alltime is on the list.

Sietse

Sietse,

Thanks for the explaination! This is not a big problem for me, but it’s always good to know how it’s working!

I’m attaching czech translation.


iwdl_lang_cz.js.zip (2.63 KB)