Author Topic: Regional mesonet-map scripts V4.00 with no map key required.  (Read 2674 times)

0 Members and 1 Guest are viewing this topic.

Offline zmarfak

  • Contributor
  • ***
  • Posts: 135
    • Matar
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #25 on: May 26, 2018, 12:42:10 PM »
Dang... Now I understand.

In mesonet-map-genjs-inc.php I unfortunately left $mapProvider in the code, and it should be $rmProvider (for all occurrences)

Try the updated script (attached)

Ken,
fixed , thanks for the work you put into it.
Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #26 on: May 26, 2018, 01:34:48 PM »
Ken,

I'm trying to implement the regional mesonet map v4.00 in my Saratoga template, but I get some errors concerning the translation script, the
registered weather stations don't appear on the map together with the footer!

http://www.meteothes.gr/wxmesonetmap.php

I also get the same behavior with the standalone script:

http://www.meteothes.gr/mesonet-map.php

All scripts are located at the root directory.

When I run the script from it's own directory, the standalone version runs fine!

http://www.meteothes.gr/mesonet-map/mesonet-map.php

Any ideas?

Thanos
I see
Quote
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/thanos/public_html/mesonet-map-lang-el.txt on line 262

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/thanos/public_html/mesonet-map-lang-el.txt on line 262

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/thanos/public_html/mesonet-map-lang-el.txt on line 262

on the page.  Grrr... thought I'd replaced the preg_replace e modifier calls.
Try the attached and see if it fixes the lang=el issue.
Edit: D'Oh.. forgot to comment the e out!  Try again.
« Last Edit: May 26, 2018, 05:39:57 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #27 on: May 26, 2018, 07:49:24 PM »
Ken,

I have installed the latest version of the meso-map software and it looks good on all browsers except for CHROME. IE Edge, Safari, Opera, Firefox, Brave all look good and seem to work correctly. Chrome however, just gives me a blank map and following the current conditions I see a listing of all stations and regional networks. The latter also appears to have text overlayed on a portion of it. NOTE: I just noticed the listing mentioned above are showing-up only on Chrome, not the other browsers.
A check of https://www.carsonvalleyweather.com/mesonet-map-check-versions.php shows everything as being current.
Additionally, the https://www.carsonvalleyweather.com/check-fetch-times.php?show=versions is also up-to-date.

I'm sure I'm missing something but haven't been able to find it, so far.
Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849

Offline tmabell

  • Forecaster
  • *****
  • Posts: 394
    • Mishawaka Weather
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #28 on: May 26, 2018, 08:02:20 PM »
Chrome is notorious for caching pages even when its own settings suggest otherwise.  I'd try clearing the browser cache and try it again.

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #29 on: May 26, 2018, 08:16:39 PM »
I have installed the latest version of the meso-map software and it looks good on all browsers except for CHROME. IE Edge, Safari, Opera, Firefox, Brave all look good and seem to work correctly. Chrome however, just gives me a blank map and following the current conditions I see a listing of all stations and regional networks. The latter also appears to have text overlayed on a portion of it.
This is close to what I've been seeing. Differences are mine is with FF (don't have Chrome), and my map is good. I do see the overlaid info in the stations listing below the map but that entire table disappears in about a second. Listings do display properly on the current conditions tab.

Just hoping for some commonality leading to some breadcrumbs... maybe?

Thanks.
John
W7JKG

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #30 on: May 26, 2018, 08:24:39 PM »
Both sets of pages work for me on Chrome 66.0.3359.139 (Official Build) (64-bit), FireFox 60.0.1 (64-bit), Opera 53.0.2907.68 (64bit),
Edge 42.17134.1.0, IE 11.48.17134.0 with no issues.

I still suspect a cache issue is the cause for working on one and not on another...
« Last Edit: May 26, 2018, 08:32:44 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #31 on: May 26, 2018, 09:55:51 PM »
Both sets of pages work for me on Chrome 66.0.3359.139 (Official Build) (64-bit), FireFox 60.0.1 (64-bit), Opera 53.0.2907.68 (64bit),
Edge 42.17134.1.0, IE 11.48.17134.0 with no issues.

I still suspect a cache issue is the cause for working on one and not on another...
I tried everything, including clearing the cache without any success. So, I powered down and restarted the computer. That fixed the problem. Not sure why, but now all looks good.

Thanks for the help!
Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #32 on: May 26, 2018, 10:37:29 PM »
I had tried clearing the cache many times but no help (my cache is set to 0 and showed that but did it again, anyway). Tried a machine restart. The only thing that did was to slightly increase the display time of the site data below the map before it went blank. That allowed me just enough time to get a shot of the overlay part - FWIW.

Thanks.
John
W7JKG

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #33 on: May 26, 2018, 11:04:21 PM »
John - that is the exact screen I had (I couldn't capture it either). But it only happened with Chrome. Drove me nuts. So, in frustration, I shut-down my computer and let it sit for about 10 minutes. Upon restart, all was well again. I have no idea what it could have been though. Probably a Windows10 feature!  :twisted:
Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #34 on: May 27, 2018, 12:15:20 AM »
That's the view before the tabber script cuts in an redraws the page in tabs.  Glad a reboot of the system cleared the cobwebs from Chrome for you Don!
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #35 on: May 27, 2018, 12:54:14 AM »
Don, I also tried a shutdown. Left it off for ~30 minutes. No good. Even if it had fixed it that wouldn't explain why it's also failing on the PC and certainly shutting down the iMac wouldn't have been expected to fix the other computer.
John
W7JKG

Offline lddaly

  • Forecaster
  • *****
  • Posts: 490
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #36 on: May 27, 2018, 12:57:25 AM »
Minor glitch... the fly-out menus appear behind the map zoom control.

Offline meteothes.gr

  • meteothes.gr Administrator
  • Member
  • *
  • Posts: 26
    • Weather Live! at Thessaloniki Historical Center
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #37 on: May 27, 2018, 03:01:12 AM »
Ken,

I'm trying to implement the regional mesonet map v4.00 in my Saratoga template, but I get some errors concerning the translation script, the
registered weather stations don't appear on the map together with the footer!

http://www.meteothes.gr/wxmesonetmap.php

I also get the same behavior with the standalone script:

http://www.meteothes.gr/mesonet-map.php

All scripts are located at the root directory.

When I run the script from it's own directory, the standalone version runs fine!

http://www.meteothes.gr/mesonet-map/mesonet-map.php

Any ideas?

Thanos
I see
Quote
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/thanos/public_html/mesonet-map-lang-el.txt on line 262

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/thanos/public_html/mesonet-map-lang-el.txt on line 262

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/thanos/public_html/mesonet-map-lang-el.txt on line 262

on the page.  Grrr... thought I'd replaced the preg_replace e modifier calls.
Try the attached and see if it fixes the lang=el issue.
Edit: D'Oh.. forgot to comment the e out!  Try again.

Ken, thanks for the fix, there is probably a typo in line 262, a redundant comma character and I get the following error message:

Parse error: syntax error, unexpected ',' in /home/thanos/public_html/mesonet-map-lang-el.txt on line 262

$temp = preg_replace_callback('|'.$svrTZ.'|',,$timestring);

I removed it and the standalone version runs without any issue from its own directory, but from the root (all files placed and configured in root) I get another error:

http://www.meteothes.gr/mesonet-map.php

Warning: preg_replace_callback() expects at least 3 parameters, 2 given in /home/thanos/public_html/mesonet-map-lang-el.txt on line 262

I believe that there's a configuration error here, but I've checked all files many times and look ok...  :???:
Another issue is that, although the map appears, the stations don't!

How can I run the file wxmesonetmap.php(or any other template file) not from the root, but from another directory like /mesonet-map? The standalone version is running fine there!

http://www.meteothes.gr/mesonet-map/mesonet-map.php

My server's PHP version: 7.1.17

Thanos

« Last Edit: May 28, 2018, 05:09:02 AM by meteothes.gr »
Weather Live! at the Historical Center of Thessaloniki
Central Macedonia - Northern Greece

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #38 on: May 27, 2018, 07:38:10 AM »
Minor glitch... the fly-out menus appear behind the map zoom control.
The CSS file, 'mesonet-map.css', is the culprit.  More specifically, the z-index.  Change
Code: [Select]
.leaflet-bottom {
position: absolute;
z-index: 1000;
pointer-events: none;
}
to
Code: [Select]
.leaflet-bottom {
position: absolute;
z-index: 400;
pointer-events: none;
}
in order to solve this problem.  Likewise for 'quake-json.css'.
« Last Edit: May 27, 2018, 07:45:41 AM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Breezy

  • Indian Trail Weather
  • Forecaster
  • *****
  • Posts: 325
    • Indian Trail Weather
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #39 on: May 27, 2018, 09:02:17 AM »
Quote
The CSS file, 'mesonet-map.css', is the culprit.  More specifically, the z-index.  Change

Thanks Jerry, looking good!   \:D/
« Last Edit: May 27, 2018, 05:00:25 PM by Breezy »
Jeff

W7-64, Intel Z170A 16 GB RAM
Davis VP2 Plus, Davis Soil Moisture/Temp Sensors, Laser Snow Depth Sensor LR4/Fluke 414D

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #40 on: May 27, 2018, 11:41:46 AM »
The CSS file, 'mesonet-map.css', is the culprit.  More specifically, the z-index. Likewise for 'quake-json.css'
Thanks, Jerry.
John
W7JKG

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #41 on: May 27, 2018, 04:53:32 PM »
Here's some replacement CSS for both to try.  The z-index default for flyout-menu runs at 500.  The un-modified Leaflet CSS used 100 to 1000.

I scaled everything down by a factor of 10 in these, so the max z-index used is 100 (and the flyout-menu flies over quite fine).

Thanks for spotting the anomaly (and noting the fix Jerry).
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #42 on: May 27, 2018, 04:59:50 PM »
Works great on both maps, Ken.  Thanks!
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Breezy

  • Indian Trail Weather
  • Forecaster
  • *****
  • Posts: 325
    • Indian Trail Weather
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #43 on: May 27, 2018, 05:07:10 PM »
Looking good on both maps here, also, Ken. Thanks!  :grin:
Jeff

W7-64, Intel Z170A 16 GB RAM
Davis VP2 Plus, Davis Soil Moisture/Temp Sensors, Laser Snow Depth Sensor LR4/Fluke 414D

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #44 on: May 27, 2018, 05:44:27 PM »
Great.. I've packaged and released both CSS updates in the quake-json and mesonet-map packages (also in the Base-* templates for quake-json.css)
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline meteothes.gr

  • meteothes.gr Administrator
  • Member
  • *
  • Posts: 26
    • Weather Live! at Thessaloniki Historical Center
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #45 on: May 28, 2018, 05:25:26 AM »
Ken, thanks for the fix, there is probably a typo in line 262, a redundant comma character and I get the following error message:

Parse error: syntax error, unexpected ',' in /home/thanos/public_html/mesonet-map-lang-el.txt on line 262

$temp = preg_replace_callback('|'.$svrTZ.'|',,$timestring);

I removed it and the standalone version runs without any issue from its own directory, but from the root (all files placed and configured in root) I get another error:

http://www.meteothes.gr/mesonet-map.php

Warning: preg_replace_callback() expects at least 3 parameters, 2 given in /home/thanos/public_html/mesonet-map-lang-el.txt on line 262

I believe that there's a configuration error here, but I've checked all files many times and look ok...  :???:
Another issue is that, although the map appears, the stations don't!

How can I run the file wxmesonetmap.php(or any other template file) not from the root, but from another directory like /mesonet-map? The standalone version is running fine there! I tried changing the path of common files(top.php, header.php, menu.php, common.php etc) with the absolute path with no luck! It still cannot find some of them and the whole page is messed up...

http://www.meteothes.gr/mesonet-map/mesonet-map.php

My web server's PHP version: 7.1.17 Checked it also locally in my pc with XAMPP platform (PHP v 7.2) and the script runs without any issues! Upgraded my web server PHP to 7.2 but the problem remains!  :shock:

Thanos
Weather Live! at the Historical Center of Thessaloniki
Central Macedonia - Northern Greece

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #46 on: May 28, 2018, 11:45:22 AM »
Hi Thanos,
Sorry for the issues and the quick hack (that didn't work)... I'm working on changing the mesonet-map-language-*.txt scripts to fix the issue.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #47 on: May 29, 2018, 01:50:36 PM »
Hi Thanos,
I've fixed that issue (and corrected all the language translation files with that problem) with the 4.03 update

https://saratoga-weather.org/scripts-mesonet-map.php

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline meteothes.gr

  • meteothes.gr Administrator
  • Member
  • *
  • Posts: 26
    • Weather Live! at Thessaloniki Historical Center
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #48 on: May 29, 2018, 02:35:06 PM »
Excellent work Ken! It's working fine! Thanks!!!  8-)

Could you please tell me, how to add new stations on the map? Is there a script accessible to us to do so?
As far as I know, there is a mail form with questions for the new members located at the Regionnal Mesonets eg: the Greek one:

http://www.meteogreece.net/signup.php?lang=en

Is there a chance to add new stations independently? Who is the recipient of the above mail form?

Thanks again for the great scripts!!!  =D>

Thanos
Weather Live! at the Historical Center of Thessaloniki
Central Macedonia - Northern Greece

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #49 on: May 29, 2018, 03:24:30 PM »
New stations (and changes to existing stations) are done by the regional network administrator based on the contents of the signup form.

The mail currently goes to meteoarachova at gmail.com , but I think Alexandros has turned over admin to someone else.  I receive copies of the signup messages too, and have admin access to the site.

Adding a station is not currently possible via a direct form.. only indirectly by the admin (or I) handling the request.

Hope this helps...
Glad the fixed Greek translation file is working for you!

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP