Revised Radar File for your use

Please post general questions about WeatherLobby here
User avatar
DaveB
Simply Incredible
Simply Incredible
Posts: 3143
Joined: Sun May 30, 2004 10:57 pm
Location: Mays Landing, NJ
Contact:

Revised Radar File for your use

Postby DaveB » Mon Mar 29, 2010 8:33 pm

I dug in, gathered some code from my friends and got Radar working great. Please see the attached file. This is based on the new interactive radar maps along with Google maps from Weather.com.

Please note that you will want to go into the file and change the long / lat parameters unless you always want to watch the weather in Atlantic City, NJ. You can also change the size parameters to suit your actual display area on your screen.

I know you will be tempted, but do not mess around with too many of the settings. Make a file backup PRIOR to starting and replacing your existing Radar.HTML file.

Enjoy :)

Post questions.
You do not have the required permissions to view the files attached to this post.
Thanks!

Dave Bruner
:shock:

Blade
Expert
Expert
Posts: 760
Joined: Tue Nov 09, 2004 9:38 pm
Location: Lucan, Ontario
Contact:

Re: Revised Radar File for your use

Postby Blade » Sat Apr 03, 2010 12:54 pm

Great job Dave :)

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Re: Revised Radar File for your use

Postby ronsatter » Thu Apr 29, 2010 6:28 pm

Hey Dave,

Works great! Thanks for sharing.

For those who may be wondering about how to implement this into your ML scenes (like me) ... here's a bit more step by step:

1. Copy the unzipped html file "Radar" to your MLServer HTML folder. The typical file path is: C:\Program Files\MLServer\HTML

2. Open the file with any common text file editor, ie. Notepad, etc.

3. Look for these lines of code:

Code: Select all

parameters['layer']='radar';
parameters['zoom']='8';
parameters['base']='h';
parameters['lat']='37.725';
parameters['long']='-122.155';
parameters['width']='782';
parameters['height']='634';
parameters['animate']='true';
parameters['border']='false';
parameters['gadgets']='false';


Change the lat and long parameters to whatever area you would like the default radar map to view. Typically your local area. Be careful when pasting your numbers not to lose the single quotes surrounding. Also, notice the "-" sign before the latitude param.

You can size the map to fit your WebLobby window size you will use on your "Radar" scene. Just change the width and height params to whatever pixel dimensions work for you.

Also, you can change the default zoom level of the map by increasing/decreasing the number in the zoom param.

That's all I would recommend you change. After you make your changes, be sure to save the edited file.

4. Make a new scene in ML with a new WebLobby window (requires the WebLobby plugin) sized to the width and height numbers you edited in the html file.

5. Click on the WebLobby window while in edit mode and enter the server path to the html file "Radar" in the label field. It should look something like this:

781~633~file:///C:\Program Files\MLServer\HTML\Radar.html~1

6. Save the changes to the scene and when you return to launch mode in ML, you should see the radar animation map in the WebLobby window.

7. Place this command in the Scene Exit Options panel of the new "Radar.mls" scene:

MLCmd|MLCommand~{{clientname}}~Web|Close~1

This is necessary to close the WebLobby window when you navigate to another scene, else it will remain open.

That's it. Very simple and doesn't use much horsepower. Bye the way, this map is completely independent of WeatherLobby. You don't even need to use WeatherLobby to build this ... you do however, need the WebLobby plugin.

Cool! 8) Thanks again, Dave.

Here's a screenshot of how it looks on my scene:
9. Weather Radar.jpg


Yes ... it's raining!

Ron
You do not have the required permissions to view the files attached to this post.
If it ain't broke ... don't fix it!

User avatar
DaveB
Simply Incredible
Simply Incredible
Posts: 3143
Joined: Sun May 30, 2004 10:57 pm
Location: Mays Landing, NJ
Contact:

Re: Revised Radar File for your use

Postby DaveB » Thu Apr 29, 2010 9:31 pm

Ron; Many thanks for the full procedure! This is a very nice application example of WebLobby. In my home, this gets used nearly every day, and more then Weatherlobby!

If anyone has any questions on implementation, please post or PM Ron or Myself. We will get you through any issues.

Please also let me know if something is not working correctly.
Thanks!

Dave Bruner
:shock:

Blade
Expert
Expert
Posts: 760
Joined: Tue Nov 09, 2004 9:38 pm
Location: Lucan, Ontario
Contact:

Re: Revised Radar File for your use

Postby Blade » Fri Apr 30, 2010 7:07 am

If you want it to default to the roads map, you can use the following:

parameters['base']='r';


Return to “WeatherLobby Questions & Answers”

Who is online

Users browsing this forum: No registered users and 1 guest