Page 2 of 2
Re: HTML5 Canvas based Odometer 'gauge'
Posted: Sat 10 Mar 2012 9:10 pm
by gpercival
Dear all,
I like the look of the Odometer for the windrun. I have upgraded to 1.6.5 but when I try to get it to work all that happens is I loose both my wind gauges.
Would anybody like to have a go at writing a simple set of instructions for implementing the Odometer.
http://www.rhumbline.com.au/weather
Geoff
Re: HTML5 Canvas based Odometer 'gauge'
Posted: Sat 10 Mar 2012 10:20 pm
by GraemeT
Hi Geoff,
This is what I did:
In realtimegaugesT.txt
Insert :
"avgbearing":"<#avgbearing>",
"windrun":"<#windrun>","press":"<#press>"
In gauges.js
insert at line 617 :
labelNumberFormat : g_labelFormat
,
useOdometer: true,
odometerParams: {digits: 4}
});
Insert at line 1442 :
}
gauge_wind.setOdoValue(data.windrun);
gauge_wind.setArea(g_wind.areas);
...and it should work...
BTW
Your site looks great, but for my eyes, your menu buttons don't contrast well with the orange text against the brushed aluminium background.
Cheers,
Re: HTML5 Canvas based Odometer 'gauge'
Posted: Sun 11 Mar 2012 4:04 am
by gpercival
Thanks Graeme,
That works like a charm.
BTW
Your site looks great, but for my eyes, your menu buttons don't contrast well with the orange text against the brushed aluminium background.

.
Thanks for the comments regarding my site. I agree that there isn't enough contrast between the menu buttons and text but I haven't come up with a good alternative yet. I don't want to make the text black becasue that is too boring but I also don't want to add more colours because that will distract from the colours that make the weather information more readable. I will consider it further.
Geoff
Re: HTML5 Canvas based Odometer 'gauge'
Posted: Sun 11 Mar 2012 6:25 am
by duke
+1
Thanks Graeme, that was on my "to do list" to look at today. I got more time in the garden now.
I was thinking maybe a "Windrun" label underneath the odometer would be a nice touch.
That would be nice.
Duke
Re: HTML5 Canvas based Odometer 'gauge'
Posted: Mon 12 Mar 2012 11:00 pm
by GraemeT
Sadly, my javascript skills aren't up to the job, everything I touch at the moment seems to break something else, so I'll leave for someone more qualified to sort....
...might just give it all a rest for a couple of days....

Re: HTML5 Canvas based Odometer 'gauge'
Posted: Tue 05 Jun 2012 8:08 pm
by SJG1976
Right next challenge for me is to try and get the odometer to work.
Have created a
www.cm2weather.co.uk/test.htm
Which uses a copy of the s test.js
But after making the changes, I get no dials again.
Back to the drawing board.
Re: HTML5 Canvas based Odometer 'gauge'
Posted: Tue 05 Jun 2012 8:24 pm
by SJG1976
Whoops, missed out a comma.
All working now, will now update the main gauges-ss page when I get a minute.
Once again, thanks to all the clever people here who have posted.
