Posts: 170
Threads: 30
Joined: Dec 2008
Hello.
I don't get on here too much but I can't stand staring at the blank spot on my touch screen where my radar used to be any more. It hasn't worked for a while now (prob a year). I recently updated cqc and I just need to get it fixed. Its been so long that I'm very rusty with navigating cqc. I'm not a programer or anything fancy I just stumbled through until I figured things out.
So I was hoping that some one could either give me a quick how to with examples of the code i need to use or if something like that exists point me in the right direction.
I really appreciate any help
Thanks
HAI OmniProII, CQC, GC-100,2 CAV6.6,Denon 2308ci, PDP5080
Posts: 3,415
Threads: 158
Joined: Jan 2006
Just put this web page on the CQC webserver, modify the var's for you screen size, lat, long etc. And call it from a web widget. If you don't see anything, you need to get it working in Internet explorer on the client running the IV first, adjust IE security settings, etc.
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']='8';
parameters['base']='h';
parameters['lat']='45.783';
parameters['long']='-95.773';
parameters['width']='835';
parameters['height']='490';
parameters['animate']='true';
parameters['border']='false';
parameters['gadgets']='true';
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 = 43;
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>
Posts: 170
Threads: 30
Joined: Dec 2008
Thanks for the quick response!!
I'll try this when I get home.
Cheers
HAI OmniProII, CQC, GC-100,2 CAV6.6,Denon 2308ci, PDP5080