Widget: custom units, custom inspector, JavaScript API

No news - good news
Post Reply
User avatar
par
Posts: 7846
Joined: Mon Sep 21, 2009 11:56 am
Name: Pasha
Location: Saint-Petersburg, Russia
Contact:

Widget: custom units, custom inspector, JavaScript API

Post by par » Wed Mar 30, 2011 1:34 pm

Hello, everybody!

Good news for anyone who have added YoWindow weather widget to a page or blog.

We have added the following two features, they were requested a lot.

1. Ulmitate unit-system control.

You can choose whatever units you wish to represent the weather.
Use our new units chooser on widget setup page

You will find 4 predefined unit systems: US, Metric, UK and Russia
I don't know about any other unit systems on Earth.
So please let me know if in your country the unit system is different from any of them.
Just reply to this post.
Choose "Custom..." option to setup your own unit system if you like.

The unit system is detected automatically from the settings of your browser.

You can setup unit system manually with flashvars in HTML.
See complete list of new flashvars in
widget parameters (units).

2. Customize Inspector contents.

Add or remove items in Inspector.
Just like you used to in YoWindow desktop edition.
You can add Astronomy section or remove all default items except temperature.

To setup Inspector look, use flashvars,
see widget parameters (inspector).


3. Control YoWindow widget with JavaScript.

There are some interesting things you can do with JavaScript
1. Create several buttons to select your favorite locations inside the widget.
2. Let the visitors to change the landscape.
3. Your own time navigation.
4. Let the visitor to control unit system.
...

Take a look at Location chooser and widget example.
If you are familiar with JavaScript programming, I'm sure you will get an idea how to communicate to YoWindow widget.

For a reference of the available methods see API remarks on widget parameters page.

I hope to write a small tutorial on the subject later on.


News from the kitchen.

We are working really hard although you don't see it.
Expect YoWindow toolbar for your browser very soon!

New animated landscape will be available in 2 - 4 weeks.

Pasha
Get YoWindow weather app for your phone or tablet.

Image Image Image

chucky

Re: Widget: custom units, custom inspector, JavaScript API

Post by chucky » Wed Mar 30, 2011 2:07 pm

hi pavel wauuuuuuuu :good:

But how do I make that I had a widget HTML? My blog, many people to a slow internet connection have had to have complained
So I will have one can also with a slow PC or internet watch widget in HTML,Then you can be a slow PC or internet watch

Regards markus

User avatar
ikarus1969
Posts: 1645
Joined: Wed Nov 18, 2009 9:58 am
Location: Vienna, Austria

Re: Widget: custom units, custom inspector, JavaScript API

Post by ikarus1969 » Wed Mar 30, 2011 2:21 pm

An API! Yeah! :Yahoo!:

Thanks to you all!
»Man is impressive. In a universe full of untold secrets he has invented boredom.«

User avatar
par
Posts: 7846
Joined: Mon Sep 21, 2009 11:56 am
Name: Pasha
Location: Saint-Petersburg, Russia
Contact:

Re: Widget: custom units, custom inspector, JavaScript API

Post by par » Fri Apr 01, 2011 6:49 am

WARNING!

We had to change the location of YoWindow java-script files.
Please update your scripts.
Change swf.yowindow.com to js.yowindow.com in all YoWindow JavaScript tags.
Example:
http://swf.yowindow.com/js/yowidget.js
turns to
http://js.yowindow.com/js/yowidget.js

Sorry.

Pasha
Get YoWindow weather app for your phone or tablet.

Image Image Image

mateusz

Re: Widget: custom units, custom inspector, JavaScript API

Post by mateusz » Thu Apr 05, 2012 10:45 am

hi, i try use your API but i have problem.

i have code

Code: Select all

function yowidget_onReady() {
            window.isYoWidgetReady = true;
            yowidget = document.getElementById('yowidget');


                yowidget.setLocationId(3094802);
                yowidget.setInspectorItemVisible("astronomy", true);
                console.log('test');
                console.log(yowidget);
        }
in console i see nothing but when i comment code

Code: Select all

 //yowidget.setInspectorItemVisible("astronomy", true);
i see 'test' and 'object'.

Unfortunately in first and secound way i dont see 'inspector astronomy'.
I want manage view my yowiget from javascript. Could you help me?

User avatar
par
Posts: 7846
Joined: Mon Sep 21, 2009 11:56 am
Name: Pasha
Location: Saint-Petersburg, Russia
Contact:

Re: Widget: custom units, custom inspector, JavaScript API

Post by par » Thu Apr 05, 2012 12:42 pm

Hey, Mateus!

You have found an error in the widget.

It turned out that this part of code was not used in the project so we missed the error.

I have fixed the problem.

This call will make Astronomy section to show up.
At least I hope so.
yowidget.setInspectorItemVisible("astronomy", true)

Clean your browser cache and reload the widget page to make the widget reload from our server.

We are very curious what you do with YoWindow.
I wonder why do you want to customize the widget?
Get YoWindow weather app for your phone or tablet.

Image Image Image

mateusz

Re: Widget: custom units, custom inspector, JavaScript API

Post by mateusz » Thu Apr 05, 2012 1:44 pm

not working... yowidget.setInspectorItemVisible("sunset", true); or yowidget.setInspectorItemVisible("astronomy", true);

Could you see the topic too: http://he1.yowindow.com/forum/viewtopic.php?f=3&t=5477 ??

I try connect my framework with you widget ;)


User avatar
par
Posts: 7846
Joined: Mon Sep 21, 2009 11:56 am
Name: Pasha
Location: Saint-Petersburg, Russia
Contact:

Re: Widget: custom units, custom inspector, JavaScript API

Post by par » Wed Apr 11, 2012 1:19 pm

Sorry for the delay - there is a lot of work.

It works for me.
Can you show me the webpage you are working on?
I will investigate the code and hopefully find the source of the problem.

I'm still wondering what is the project you are working on?
Get YoWindow weather app for your phone or tablet.

Image Image Image

Post Reply