Skip to content

Leaflet/OpenStreetMap display of Afilliated Regional Weather Networks member station weather conditions

License

Notifications You must be signed in to change notification settings

ktrue/global-mesonet-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leaflet/OpenStreetMaps Global mesonet display

The Affiliated Regional Weather Networks have been quite popular, and now it is possible for you to add a Leaflet/OpenStreetMaps map display of conditions from around the world to your own website. We do prefer that the script(s) be used by members who contribute their data to a Regional Weather Network, but all are welcome to use this script set if they like.

Version 4.00 of the script set no longer requires an API key for map display. Support is provided for Mapbox.com map tile displays if you have an Access Token, but 5 supplied maps are 'API key free'.

Here's a sample of the display:

Sample output

Installation/Configuration

The map package (below) comes in one basic configuration:

  • A PHP map for standalone or a plugin for the Saratoga AJAX/PHP templates (V2 and V3 compatible)

The two support scripts (global-links.php and global-conditions-json.php ) are included to help minimize the access time to draw your map page by caching some files from the Affiliated Regional Weather Networks home site locally on your website. These files are:

  • network-list-inc.html
  • network-links-inc.html
  • member-count.txt
  • members-list-inc.html
  • global-conditions.json

Starter files of the above are included with the PHP distributions with content that lets you know that the cache file has not been written. Depending on your PHP installation, the above files may need to have permissions set to 666 (write/read by all) in order for the caching to work. If you do a 'view-source' on the PHP page with the scripts in it, it should show any error messages encoutered as HTML comments.

For the Saratoga multilingual templates, you may need to add to your language-LL-local.txt files the translations for:

langlookup|Global Station Map|Global Station Map|  
langlookup|Global Station Map of Affiliated Weather Networks|Global Station Map of Affiliated Weather Networks|  
langlookup|Nets|Nets|  
langlookup|Weather, Lightning, WebCam|Weather, Lightning, WebCam|  
langlookup|Weather, WebCam, Lightning|Weather, WebCam, Lightning|  
langlookup|Weather, Lightning|Weather, Lightning|  
langlookup|Weather, WebCam|Weather, WebCam|  
langlookup|Weather|Weather|  
langlookup|Conditions not available|Conditions not available|  
langlookup|Temp|Temp|  
langlookup|Hum|Hum|  
langlookup|DewPT|DewPT|  
langlookup|Baro|Baro|  
langlookup|About the Global Map|About the Global Map|  
langlookup|Affiliated Regional Weather Networks|Affiliated Regional Weather Networks|  

Which will allow for the translation of the headings and pop-up station data boxes to language LL. You may also need to copy wxglobal-en.html to wxglobal-LL.html and translate the text inside from English to language LL so the rest of the page will display correctly. Be sure to use the correct character set for your page to match the other translation files used by the Multilingual templates. The multilingual plugin will also read the corresponding language-LL.js JavaScript so the conditions, wind-directions and barometric pressure trend can be translated in the popup conditions windows.
Note: if you create a translation for the multilingual template map, please let me know so I can include it in the global-map-template-ML distribution so others can use it too. Thanks in advance!

Version 4.00 now has configuration in one file global-map-settings.php. See the comments in that file to perform your own configuration.
See the global-map-README.txt file for more information about installation.
Also new in V4.00 are rotating conditions display under the station pins. This feature can be disabled in the configuration if you find it too 'busy' a display.

About

Leaflet/OpenStreetMap display of Afilliated Regional Weather Networks member station weather conditions

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published