Page 3 of 4

Re: Highcharts Tides

Posted: Sun 30 Dec 2018 9:32 pm
by Mapantz
I've uploaded and filled in the necessary stuff, but I get a blank page and no cache file. :cry:

Re: Highcharts Tides

Posted: Sun 30 Dec 2018 9:40 pm
by Big Daddy
Sorry Mark, but it seems to throw up some other errors as well

PHP Warning: Missing argument 1 for uk7daytides::getTides(), called in /var/www/html/Tides/tideDemo.php on line 15 and defined in /var/www/html/Tides/uk7daytides.php on line 53, referer: http://192.168.0.5/Tides/
PHP Warning: Missing argument 2 for uk7daytides::getTides(), called in /var/www/html/Tides/tideDemo.php on line 15 and defined in /var/www/html/Tides/uk7daytides.php on line 53, referer: http://192.168.0.5/Tides/
PHP Notice: Undefined variable: stationId in /var/www/html/Tides/uk7daytides.php on line 55, referer: http://192.168.0.5/Tides/
PHP Notice: Undefined variable: duration in /var/www/html/Tides/uk7daytides.php on line 56, referer: http://192.168.0.5/Tides/

Doesnt seem to affect the drawing of the graphs.

Andy

Re: Highcharts Tides

Posted: Sun 30 Dec 2018 9:44 pm
by Big Daddy
Hi Mapantz,

Had the same and already reported back to Mark.

It seems to be caused by the very first line of tideDemo.php file where it has this:
<?php require 'zbblock.php'; ?>

It looks for this file and as it doesnt find it hangs.

I removed it and all is ok.

Read my post on bottom of page 2 of this topic.

Andy

Re: Highcharts Tides

Posted: Sun 30 Dec 2018 9:47 pm
by mcrossley
The zbblock include shouldn't be there, let me take a look at the other errors, but it will be tomorrow now.

The idea of the class is that you can instantiate it once, then call getTide() multiple times with different station IDs, once for each port. If you do not pass a station ID, then it defaults to the one defined in the class file.

That was the theory anyway, I need to check if the files I zipped contained all the latest updates...

Re: Highcharts Tides

Posted: Sun 30 Dec 2018 9:51 pm
by Mapantz
Big Daddy wrote: Sun 30 Dec 2018 9:44 pm Hi Mapantz,

Had the same and already reported back to Mark.

It seems to be caused by the very first line of tideDemo.php file where it has this:
<?php require 'zbblock.php'; ?>

It looks for this file and as it doesnt find it hangs.

I removed it and all is ok.

Read my post on bottom of page 2 of this topic.

Andy
I use zbblock myself, so it isn't that. I removed it for now anyway. :)

I've turned on error checking and nothing pops up.

Re: Highcharts Tides

Posted: Mon 31 Dec 2018 11:40 am
by mcrossley
Looks like I updated my local zip and never sync'd it to my server :bash:

I've also added a couple of examples of calling .getTide() to the sample HTML page.

Let's see if this is any better!

Re: Highcharts Tides

Posted: Mon 31 Dec 2018 2:54 pm
by jdc
I made this page recently using the API but don't have Mark's skills - so kept it simple.
I'd like to 'prettify' the chart a bit more sometime. :?
http://lethamshank.co.uk/met/localwx.htm?page=wx_tide

Going to download for improvement ideas. :oops:

Re: Highcharts Tides

Posted: Mon 31 Dec 2018 3:22 pm
by Big Daddy
Hi Mark,
Thanks. Will take a look when I get back home in a couple of days. Have had to put my web stuff on hold for some sort of family New Year get together. Funny, it only seems like a week since we had the last get together.

Enjoy the New Year everyone and here is to keeping Cumulus alive.

Andy

Re: Highcharts Tides

Posted: Sun 06 Jan 2019 4:43 pm
by Big Daddy
Hi Mark,
Firstly, a big thank you for putting this together and getting something out that I have been able to implement. I have spent a few days on this trying to learn whats going on and using some of the little knowledge I gleamed from working with the CumuluxMX charts to get the following.

http://midlifedad.me.uk/weather/boston_tides.php

You can click on the tides button in the top right and select different ports.

One thing I cant work out is that the 1 day zoom only works on the above page and not any of the other 5. All my PHP pages are identical with a couple of minor text changes and a change of name of the variable $data, which is $data on this page, $data2 one another, $data3 etc.

I cant really find any answer on the internet with teh exception that they are automatically disabled in highcharts / highstock if the rleveant data isnt present. When I inspect the webpage in Firefox I can see this particular zoom button shows as "disabled" on all pages except the one above where it say "normal"

Its not a big problem, more of a nicety.

Andy

Re: Highcharts Tides

Posted: Sun 06 Jan 2019 5:30 pm
by Mapantz
I've just got around to the updated version. All working!

I'm just gonna add in my css and stuff. This is very useful to me. Thank you! :)

Re: Highcharts Tides

Posted: Mon 07 Jan 2019 9:47 am
by mcrossley
Big Daddy wrote: Sun 06 Jan 2019 4:43 pm One thing I cant work out is that the 1 day zoom only works on the above page and not any of the other 5. All my PHP pages are identical with a couple of minor text changes and a change of name of the variable $data, which is $data on this page, $data2 one another, $data3 etc.
I think may be because 1 day does not give you enough data points to draw the spline curve?

Re: Highcharts Tides

Posted: Sat 20 Jul 2019 9:16 pm
by Mapantz
Just thought i'd pop back to this..

I forgot about it if i'm honest, but I want to load it up on my site properly now. I just noticed that the tide times are one and two hours behind. High tide in Swanage is at 11:37pm. My graph shows is at 9:27pm. The next low tide is tomorrow at 6:10am, my graph shows it as 5:03am. The next high tide is at 12:25pm, my graph shows 10:34am.

All a bit confusing!

Re: Highcharts Tides

Posted: Mon 22 Jul 2019 10:04 am
by mcrossley
The graphed times are in GMT - what source are you checking them against? Please use the UKHO

Re: Highcharts Tides

Posted: Mon 22 Jul 2019 10:49 am
by Mapantz
mcrossley wrote: Mon 22 Jul 2019 10:04 am The graphed times are in GMT - what source are you checking them against? Please use the UKHO
I actually use this website: https://tides4fishing.com/uk/england/swanage

As I do a lot of sea fishing, that is my most trusted source, even when checking on a mobile phone when I am actually at Swanage.

However, checking on UKHO site and adding the 1 hour for daylight savings my graph is showing times 2 hours early for each tide.

https://warehamwx.co.uk/tides.php

Re: Highcharts Tides

Posted: Mon 22 Jul 2019 1:31 pm
by mcrossley
Ah, Swange! The Solent is odd because it has double tides, it always comes up on sailing courses, I wonder if the code copes with that...