Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Regional network mesonet-map.php updated V3.07

Discussion of Ken True's web site templates

Moderator: saratogaWX

User avatar
saratogaWX
Posts: 835
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Regional network mesonet-map.php updated V3.07

Postby saratogaWX » Fri Apr 07, 2017 7:25 pm

Recent changes in the Google Maps API for JavaScript caused an issue with the maps -- clicking on a cluster would cause all clusters to vanish, and the contained icons not displayed.

Version 3.07 fixes that issue (mainly in an updated mesonet-map.js file). Also, the mesonet-map.php and wxmesonetmap.php pages were changed to use https:// to load the Google Map script from the google site.

The MESO-images file has two new images (--.gif and ---sm.gif) to handle stations that have no wind direction in the reports.

The attached .zip has all the updates needed, or you can download the full package from here

Whew.. took me about 12 hrs of debugging the markerclusterer script to find the ONE line that need to be inserted to fix the issue.

Best regards,
Ken
You do not have the required permissions to view the files attached to this post.

User avatar
Toxic17
Posts: 544
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.1 Stretch
Location: Bangor, NI
Contact:

Re: Regional network mesonet-map.php updated V3.07

Postby Toxic17 » Fri Apr 07, 2017 9:31 pm

Hi Ken, Just updated with the file you uploaded, but lost the stations on my map. none are showing up. did something change?

https://www.conligwx.org/wxmesonetmap.php

also looks like my site has gone from the Current Conditions.

I'll try a full upload.
Regards Simon

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
Image

User avatar
saratogaWX
Posts: 835
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: Regional network mesonet-map.php updated V3.07

Postby saratogaWX » Fri Apr 07, 2017 11:15 pm

Your mesonet-map-json.php is returning the JSON with the markers and a PHP error message embedded
<br />
<b>Warning</b>: A non-numeric value encountered in <b>/share/CACHEDEV1_DATA/htdocs/weather/mesonet-map-common.php</b> on line <b>606</b><br />
and that is screwing up the JSON decode.

Line 606 in mesonet-map-common.php is

Code: Select all

$GUST = (float)($GUST * 0.44704); // mph -> m/s
so the $GUST value from one station is likely incorrect from the UKWN.

Try changing mesonet-map-common.php

Code: Select all

  if ($GUST <> '-') {
   if (!preg_match('|m/s|',$uomWind)) { // convert wind to meters-per-second
to

Code: Select all

  if ($GUST <> '-' and is_numeric($GUST)) {
   if (!preg_match('|m/s|',$uomWind)) { // convert wind to meters-per-second
to filter out those invalid gust values.. I found 4 stations in the UKWN with that issue.

User avatar
Toxic17
Posts: 544
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.1 Stretch
Location: Bangor, NI
Contact:

Re: Regional network mesonet-map.php updated V3.07

Postby Toxic17 » Sat Apr 08, 2017 12:17 am

Thanks I have done that but still no stations listed or my Site in the Current Conditions.

Line 757 error.

I changed 753 to:

Code: Select all

  if ($GUST <> '-' and is_numeric($GUST)) {


working now....

is this due to PHP 7.1.3 perhaps?

Also I did have redirect from http to https

but looks like mesonet does not like that. I had asked UKWN admin to see if https would work, but looks like he could not do it.
Regards Simon

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
Image

dazza1223
Posts: 172
Joined: Sun Jan 25, 2015 8:41 pm
Weather Station: davis vantage vue
Operating System: raspberry pi 3
Location: worthing
Contact:

Re: Regional network mesonet-map.php updated V3.07

Postby dazza1223 » Sat Apr 08, 2017 9:24 pm

hi just set up this but i cant see in on the map am i missing something here http://www.davisworthing.co.uk/maps/mesonet-map.php

User avatar
saratogaWX
Posts: 835
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: Regional network mesonet-map.php updated V3.07

Postby saratogaWX » Sun Apr 09, 2017 2:02 am

Seems to be working fine on your site now...

User avatar
Toxic17
Posts: 544
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.1 Stretch
Location: Bangor, NI
Contact:

Re: Regional network mesonet-map.php updated V3.07

Postby Toxic17 » Sun Apr 09, 2017 2:29 am

Its working only because of the changes, but I had to re-enable http for the UKWN to get my realtime.txt can WX networks not support https?
Regards Simon

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
Image

User avatar
saratogaWX
Posts: 835
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: Regional network mesonet-map.php updated V3.07

Postby saratogaWX » Sun Apr 09, 2017 4:07 am

Toxic17 wrote:Its working only because of the changes, but I had to re-enable http for the UKWN to get my realtime.txt can WX networks not support https?

The regional networks do support https:// access to the conditions data file, but does not support http://->https:// redirects. Just have Martin at ukwn.net change your station to use https:// to pull the data from your site.

dazza1223
Posts: 172
Joined: Sun Jan 25, 2015 8:41 pm
Weather Station: davis vantage vue
Operating System: raspberry pi 3
Location: worthing
Contact:

Re: Regional network mesonet-map.php updated V3.07

Postby dazza1223 » Sun Apr 09, 2017 9:58 am

ok how do i change the station to use https

User avatar
saratogaWX
Posts: 835
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: Regional network mesonet-map.php updated V3.07

Postby saratogaWX » Sun Apr 09, 2017 12:09 pm

dazza1223 wrote:ok how do i change the station to use https

If you mean 'change the UKWN to use HTTPS to pull my conditions', then use the contact form on the www.ukwn.net site to let Martin know the particulars and he can change it. It is NOT something you can change yourself.

If you mean 'how can I get my website to use HTTPS', then that's something to work with your website hoster. The mesonet-map scripts work well with either http: or https: hosting.

If it's something else you mean, then please elucidate :)

User avatar
Toxic17
Posts: 544
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.1 Stretch
Location: Bangor, NI
Contact:

Re: Regional network mesonet-map.php updated V3.07

Postby Toxic17 » Mon Apr 10, 2017 10:38 pm

saratogaWX wrote:
dazza1223 wrote:ok how do i change the station to use https

If you mean 'change the UKWN to use HTTPS to pull my conditions', then use the contact form on the http://www.ukwn.net site to let Martin know the particulars and he can change it. It is NOT something you can change yourself.


I have been in touch with Martin and he has managed to update the realtime.txt to my https url,

however he is unable to set my website (when you click on the popup over a site - mine being Conlig, Co. Down) to an https url as it removes the colon in the URL.

it ends up like so: http://https//www.conligwx.org/ then resolves to : https//www.conligwx.org/ which is not a correct formatted web address.
Regards Simon

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
Image

User avatar
saratogaWX
Posts: 835
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: Regional network mesonet-map.php updated V3.07

Postby saratogaWX » Mon Apr 10, 2017 10:52 pm

Ah... I'll contact Martin.. he needs an updated mesonet collector script (V3.00) to better handle http/https.

Best regards,
Ken

User avatar
Toxic17
Posts: 544
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.1 Stretch
Location: Bangor, NI
Contact:

Re: Regional network mesonet-map.php updated V3.07

Postby Toxic17 » Tue Apr 11, 2017 8:27 am

saratogaWX wrote:Ah... I'll contact Martin.. he needs an updated mesonet collector script (V3.00) to better handle http/https.

Best regards,
Ken


Thanks Ken, all now working correctly. :clap:
Regards Simon

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
Image


Return to “Saratoga Templates”

Who is online

Users browsing this forum: No registered users and 4 guests