Animated Weather Maps - Add HTML in Xlobby??

V3 help and support questions

Animated Weather Maps - Add HTML in Xlobby??

Postby smarty on Thu Feb 04, 2010 6:07 pm

EDIT

Sorry, this does seem to work nicely if you add it as a "web browswer", and use the file loaction as the URL.

Waahoo...Animated weather within Xlobby!!!



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


I seen some HTML code over at Cocoontech that really gave a nice, clean animated radar map (post #41 in this thread):

http://www.cocoontech.com/forums/index.php?showtopic=15702&st=30&start=30

Does anyone have any ideas how this might be able to be incorporated into Xlobby? I have tried using insert "web image" or insert "web browser", but these don't seem to work.

Here is the source code:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script type="text/javascript">
var parameters = new Array();
var width = 0;
var height = 0;
var viewportwidth = 0;
var viewportheight = 0;
var xoffset = 0;
var yoffset = 0;
var xmodify = 0;
var ymodify = 0;

function getParameters()
{
var query = window.location.search.substring(1);
var parms = query.split('&');
for (var i=0; i<parms.length; i++)
{
var pos = parms[i].indexOf('=');
if (pos > 0)
{
var key = parms[i].substring(0,pos);
var val = parms[i].substring(pos+1);
parameters[key] = val;
}
}
}
parameters['layer']='radar';
parameters['zoom']='6';
parameters['base']='h';
parameters['lat']='29.32';
parameters['long']='-98.28';
parameters['width']='975';
parameters['height']='515';
parameters['animate']='true';
parameters['border']='false';
parameters['gadgets']='false';

getParameters();

width = parseInt(parameters['width']);
height = parseInt(parameters['height']);
viewportwidth = width;
viewportheight = height;

if(parameters['border'] =='false')
{
xmodify = 13;
ymodify = 13;
}

if(parameters['gadgets'] == 'false')
{
xmodify = 40;
ymodify = 82;
}

width = width+xmodify;
height = height+ymodify
viewportwidth = width+xmodify;
viewportheight = height+ymodify;
xoffset = -xmodify;
yoffset = -ymodify;

</script>
</head>

<style type="text/css">

body
{
overflow: hidden;
padding: 0px;
margin: 0px;
}
</style>


<body>
<script>document.write('<div style="position:relative;left:'+xoffset+';top:'+yoffset+';"><object id ="radar" width="'+width+'" height="'+height+'" border="0" hspace="0"><embed src="http://image.weather.com/web/flash/FMMain.swf?lat='+parameters['lat']+'&long='+parameters['long']+'&initialWeatherLayerType='+parameters['layer']+'&viewPortWidth='+viewportwidth+'&viewPortHeight='+viewportheight+'&initialZoomLevel='+parameters['zoom']+'&wxAnimateOnStart='+parameters['animate']+'&baseMap='+parameters['base']+'" width="'+width+'" height="'+height+'"></embed></object></div>')</script>
</body>
</html>
smarty
 
Posts: 179
Joined: Thu Jul 27, 2006 12:04 am
Location: San Antonio, TX USA

Re: Animated Weather Maps - Add HTML in Xlobby??

Postby wesblack on Thu Feb 04, 2010 11:22 pm

wesblack
 
Posts: 852
Joined: Mon Mar 05, 2007 5:02 pm
Location: Valencia, Ca

Re: Animated Weather Maps - Add HTML in Xlobby??

Postby PhilB on Fri Feb 05, 2010 1:45 am

That is very cool. If you serve the page from a web server, you can show it in the XL browser but it would better to have it in a plugin.....xweather anyone?

PB
PhilB
 
Posts: 283
Joined: Sat Feb 18, 2006 6:38 pm

Re: Animated Weather Maps - Add HTML in Xlobby??

Postby samsonlov on Fri Feb 05, 2010 6:47 pm

Awesome!
Please Bump.
:)
samsonlov
 
Posts: 220
Joined: Thu Sep 25, 2008 1:39 am
Location: Los Angeles, CA