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

0 Members and 1 Guest are viewing this topic.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
This is a major rewrite of the mesonet-map* scripts from Version 3 to the Version 4.00 - 23-May-2018 release today:

1) no Google map key is required.  The new script set uses the open-source Leaflet/OpenStreetMaps set of scripts to provide the same functionality and improved display/performance.
2) support is provided for OPTIONAL Mapbox.com (Terrain3 and Satellite) maps if you have a Mapbox.com Access Token, but it is not required to display using the included 5 different map tile providers.
3) The map markers no longer display 'N/A' legends for 'Offline' stations.
4) A right-click context menu on the map is now available to assist navigation, and provide info to you for custom configuration of map zoom, center and clustering behavior.
5) the Catalan and Finnish (Suomi) language plugins were fixed

See the docs and download from https://saratoga-weather.org/scripts-mesonet-map.php

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

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 #1 on: May 23, 2018, 10:06:30 PM »
Thanks, Ken.  Great job, as usual! =D> \:D/ =D>

I'm wondering why my map zoom changes aren't applied.  I went from 4 to 5 to 7 with no change in the initial zoom level.  Did I do something wrong?

Edit:  I suspect it's a cache issue and will eventually resolve.  Now set to initial zoom of 5.
« Last Edit: May 23, 2018, 10:13:59 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #2 on: May 23, 2018, 10:24:16 PM »
To make sure your customization for the selected map 'sticks', you have to have either

$rmMapUseDefaults = false;

in mesonet-map-settings.php or

$SITE['rmMapUseDefaults'] = false;

in Settings.php (which overrides the mesonet-map-settings.php entry).

Then the map center and zoom specs you select for the selected network will apply.

Shouldn't be any cache issue.. the only things cached are the regional mesonet definitions and the stations/conditions files from the selected mesonet.  If your browser is caching the JavaScript on a .php page (the inline stuff), then a shift-reload should clear that out.

BTW.. it may seem counter intuitive, but if you err and use

$something = 'false';

it will be evaluated as true (since the string is not empty).

Make sure to use the true or false as a keyword (without quotes) as they are built-in logical values.
« Last Edit: May 23, 2018, 10:26:42 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 gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #3 on: May 24, 2018, 12:29:33 AM »
Thanks for the help, Ken.  It was operator error because I overlooked the setting '$rmMapUseDefaults = true;' in 'mesonet-map-settings.php'.  Setting this to false solved my problem since there was no reference to '$rmMapUseDefaults' in my 'Settings.php'.
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 #4 on: May 24, 2018, 09:56:09 AM »
Ken,

Not sure as to what's going on but I probably didn't follow your installation instructions correctly. Maybe something to do with the "cache" as I was running the previous version?  http://indiantrailweather.com/wxmesonetmap.php   :oops:

Thanks for all of your time and effort. Much appreciated!  =D>

Jeff

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

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 #5 on: May 24, 2018, 10:00:49 AM »
Looks good here, Breezy!  I'm not sure what the problem is you're referring to.
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 #6 on: May 24, 2018, 11:01:45 AM »
Call off the Calvary :!:. I just refreshed the page. Looks great. Thanks, Jerry for taking a look. Ken, you can go back to sleep ... :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 zmarfak

  • Contributor
  • ***
  • Posts: 135
    • Matar
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #7 on: May 24, 2018, 04:38:48 PM »
Hi Ken,
nice work
I updated the pages but I like the topo map to appear.
I did the same thing as with the earthquake maps (no problem there), but I'm not succeeding. I overlook something, can you help ?
I use the following code in mesonet-map-settings.php to choose for the topo map
Code: [Select]
//$rmProvider = 'Esri_WorldTopoMap'; // ESRI topo map - no key needed
//$rmProvider = 'OSM';     // OpenStreetMap - no key needed
//$rmProvider = 'Terrain'; // Terrain map by stamen.com - no key needed
$rmProvider = 'OpenTopo'; // OpenTopoMap.com - no key needed
//$rmProvider = 'Wikimedia'; // Wikimedia map - no key needed
//
//$rmProvider = 'MapboxSat';  // Maps by Mapbox.com - API KEY needed in $mapboxAPIkey
//$rmProvider = 'MapboxTer';  // Maps by Mapbox.com - API KEY needed in $mapboxAPIkey

But the page loads with the terrain map.

Thanks for the support.
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: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #8 on: May 24, 2018, 05:02:16 PM »
Alas, the OpenTopo is only available on http sites since the tiles are only available via http.  For HTTPS sites, that option is automatically removed.  For HTTPS sites, you only have 4 choices 'OSM', 'Terrain', 'Esri_WorldTopoMap' or 'Wikimedia'
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 #9 on: May 24, 2018, 05:06:36 PM »
Ken, two minor items. Bringing up the info window for any station in my area shows 'PDT' as the local time. In AZ it's always MST (in about 95% of the state). Could not find a TZ setting.

On the SWN tab the Current Conditions below the map is missing. It comes up for a split second on first entering the page and then blanks out. Current Conditions do show properly under the Current Conditions tab. Noticed Breezy's page is doing the same thing.

Thank you.
« Last Edit: May 24, 2018, 05:10:35 PM by jgillett »
John
W7JKG

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #10 on: May 24, 2018, 05:20:52 PM »
Ken, two minor items. Bringing up the info window for any station in my area shows 'PDT' as the local time. In AZ it's always MST (in about 95% of the state). Could not find a TZ setting.
The map currently has one timezone for all stations on the regional network -- right now, the SWN uses 'America/Los_Angeles' for that timezone.  There's not a current capability to display a separate timezone for each station.

On the SWN tab the Current Conditions below the map is missing. It comes up for a split second on first entering the page and then blanks out. Current Conditions do show properly under the Current Conditions tab. Noticed Breezy's page is doing the same thing.

Thank you.
That is strange.. like some CSS is cutting in to blank out the text.  Using Firefox browser on your wxmesonetmap.php I see
Quote
Conditions data shown was collected
from Thu, 24-May-2018 13:38:45 to Thu, 24-May-2018 14:05:22

Regional mesonet-map script by Saratoga-Weather.org
below the map and it shows no sign of blanking out.
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 #11 on: May 24, 2018, 05:32:46 PM »
That is strange.. like some CSS is cutting in to blank out the text.  Using Firefox browser on your wxmesonetmap.php I see
Quote
Conditions data shown was collected
from Thu, 24-May-2018 13:38:45 to Thu, 24-May-2018 14:05:22

Regional mesonet-map script by Saratoga-Weather.org
below the map and it shows no sign of blanking out.
Now I'm more confused. Tried Safari on the iMac and it does the same thing. Also tried FF on the PC and ditto there. All browsers are the latest versions.

Thanks.
John
W7JKG

Offline zmarfak

  • Contributor
  • ***
  • Posts: 135
    • Matar
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #12 on: May 25, 2018, 03:41:05 PM »
Alas, the OpenTopo is only available on http sites since the tiles are only available via http.  For HTTPS sites, that option is automatically removed.  For HTTPS sites, you only have 4 choices 'OSM', 'Terrain', 'Esri_WorldTopoMap' or 'Wikimedia'

Ken,
I don't understand what you mean
see attachment , I can choose the topo and it's default on my earthquake page , or ist his another "topo" map ?
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: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #13 on: May 25, 2018, 04:31:00 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 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: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #14 on: May 25, 2018, 05:18:30 PM »
I've updated the mesonet-map.zip distribution with that fix.
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 #15 on: May 25, 2018, 06:22:05 PM »
Unfortunately after loading the new genjs file mine is still busted on FF and Safari.

Thanks.
John
W7JKG

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #16 on: May 25, 2018, 07:48:26 PM »
Clear the browser cache?? -- I tried the scripts in Firefox, Chrome, Opera and Safari (on iPad and iPhone).. all worked just fine.

That update didn't change anything but the ability to select the default map to use via $rmProvider (or $SITE['rmProvider'] ) which was broken in the V4.00 version of mesonet-map-genjs-inc.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 jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #17 on: May 26, 2018, 01:59:47 AM »
Guess we'll just dump this one.

Thanks for looking, Ken.
John
W7JKG

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 #18 on: May 26, 2018, 07:48:59 AM »
Guess we'll just dump this one.

Thanks for looking, Ken.
You have a puzzling problem, John.  Your mesonet page shows up fine here in the latest Chrome, FF, and Safari browsers.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6364
    • Valentine Nebraska's Real-Time Weather
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #19 on: May 26, 2018, 08:09:16 AM »
Jerry have you looked at the Nebraska Mesonet, 68 stations? I link directly to them, be nice if we had a Saratoga script.. :lol:.  These are top notch weather stations and match our Davis instruments very well. I have a station called AKA Sparks and Merritt close by that I watch all the time.

https://mesonet.unl.edu/about
Randy

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 #20 on: May 26, 2018, 08:45:27 AM »
Thanks, Randy.  I just added this link to my menu.  The presentation isn't as 'hands-off' as our Mesonets, but it's functional.  It looks like the contributors are all governmental units, and I doubt it would be easy to scrape this info to create a new Mesonet.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6364
    • Valentine Nebraska's Real-Time Weather
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #21 on: May 26, 2018, 09:32:59 AM »
Yes I understand, anyway its a nice network. Since discovered I watch all the time.  I've wondered why these Mesonet stations haven't joined other networks, must be harder said than done.
Randy

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 #22 on: May 26, 2018, 10:03:15 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
Weather Live! at the Historical Center of Thessaloniki
Central Macedonia - Northern Greece

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #23 on: May 26, 2018, 10:39:57 AM »
You have a puzzling problem, John.  Your mesonet page shows up fine here in the latest Chrome, FF, and Safari browsers.
Agreed, Jerry. Makes no sense at all. Thanks for looking.
John
W7JKG

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1308
  • BismarckWeather.net
    • BismarckWeather.net
Re: Regional mesonet-map scripts V4.00 with no map key required.
« Reply #24 on: May 26, 2018, 12:25:32 PM »
Looks good Ken.  Thanks for the hard work.

http://www.bismarckweather.net/wxmesonetmap.php
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

 

anything