here are different kinds of networks were you can upload your weatherstations data. In return for uploading your data, the weather networks provides all kind of goodies to be included on your web-site.
There are many regional networks . And a lot of those networks work together to collectively provide a global coverage These are “Regional Weather Networks”, an example the BNLWN = Benelux Weather Network, or the AKWN = Alaska Weather Netwerk. All their names end on WN.
For Europe there is also EWN = European Weather Netwerk. There is a separate chapter for EWN
These are the settings in wsUserSettings.php (example BNLWN)
#--------------------------------------------------------------------------- # Mesonet id's and names #--------------------------------------------------------------------------- $SITE['mesoID'] = 'BNLWN'; // ##### $SITE['mesoName'] = 'Benelux Weather Network'; // ##### $SITE['mesoLink'] = 'http://www.beneluxweather.net/'; // #####
Most of the regional networks use more or less the same scripts. Download a fresh copy of your mesonet swcripts (??WN–mesomap.zip) and unzip the folder. IMPORTANT Place that folder in the root of your website, not in the weather?? folder.
ROOT/ ==> ??WN-mesomap/ ==> Weather27/
A fast and relative simple solution for a ??WN :
This page uses an iFrame to excecute the standard scripts. You have to tweak the mesomap-testpage.php script in your Regional Network download a little bit to get rid of the large demo heading. But for most smaller networks this page looks OK.
U dient nu alleen nog de jusite menu-selectie te maken in wsMenuData.xml
<item nr = "31" show = "no" noutf8 = "WINDOWS-1252" caption = "Local Network" link = "mesomaps/wnSpecificInc.php" head = "mesomaps/wnSpecificCSS.php" /> <item nr ="31" show ="mesoID" link ="mesomaps/wnGeneralFrame.php" caption ="Local Network" title ="Local Weather Exchange Stations" />
Standaard wordt de tweede selectie met nr 31 gebruikt.
De rest van dit WiKi hoofdstuk kan worden overgeslagen.
Van een beperkt aantal RWN zijn de scripts al aangepast. Op het moment van schrijven zijn dit: AKWN BNLWN COWN en WCWN.
Voor deze netwerken hoeven alleen twee scripts uit de weather27/mesomaps/wnScripts map naar de map van het Regionale Weer Netwerk ??WN gekopieerd te worden.
De rest van dit WiKi hoofdstuk kan worden overgeslagen.
Gebruik de ondersteuning link om informatie in te winnen of als u de aanpassingen liever door mij laat doen.
In de code voorbeelden gebruiken we de BNLWN als voorbeeld. Lees dus telkens in plaats van BNLWN uw eigen “Regional Netwerk” afkorting.
Definieer de map waarin de ??WN scripts staan, direct na het begin van de settings:
// ------------- Settings ---------------------------------------- // $fldr = '../BNLWN-mesomap/'; // #### added / changed to run in the template
Wijzig de lokatie van “graphics” = de grote kaart met alle stations:
$Graphic = $fldr."BNLWN_meso.jpg"; // #### added / changed to run in the template # $Graphic = "./BNLWN_meso.jpg"; // used for display on this page and in code gen.
Wijzig de lokatie van de Wind Pijlen / Iconen:
$windArrowDir = $fldr.'BNLWN-images/'; // #### added / changed to run in the template # $windArrowDir = './BNLWN-images/'; // set to directory with wind arrows, or
En van de Iconen voor de huidige weercondities:
$condIconsDir = $fldr.'BNLWN-images/'; // #### added / changed to run in the template # $condIconsDir = './BNLWN-images/'; // for condition icons (same as Anole's)
Telkens hebben we commentaar gemaakt van de bestaande programma regel en een aangepaste regel toegevoegd.
Wijzig ook hier de lokatie van “graphics” = de grote kaart met alle stations:
# $Graphic = './NWWN_meso.jpg'; $localImageName = str_replace($fldr,'',$Graphic); // #### added / changed to run in the template
En ook hier:
# Full URL of the mesomap image you are downloading? $remoteImageURL = "$network_url$localImageName"; // #### added / changed to run in the template # $remoteImageURL = "$network_url$Graphic";
Het script wat de WeatherNetwork gegevens afbeeldt verdeelt de informatie over meedere tabs.
Standaard worden tab 1 en 2 gecombineerd. Wilt u liever drie tabs dan moet er in de ??WN/??WN-mesomap.php script 1 aanpassing gemaakt worden. De eerste regel hieronder:
$BNLWN_MAP = $htmlstart . $ourGraphic . $htmlnext . $scroller . $html . prt_jscript(); $BNLWN_TABLE = $table; $BNLWN_CSS = $CSS;
Wijzigt u in:
# $BNLWN_MAP = $htmlstart . $ourGraphic . $htmlnext . $scroller . $html . prt_jscript(); # Added to get extra tab $BNLWN_MAP = $htmlstart . $ourGraphic . $htmlnext . $scroller ; $BNLWN_LIST = $html . prt_jscript(); $BNLWN_TABLE = $table; $BNLWN_CSS = $CSS;
De “grote” ??WN_MAP (= kaart plus lijst) wordt op commentaar gezet en gesplitst in een kaart ??WN_MAP en een aparte lijst ??WN_LIST.
De menu keuze voor het WeatherNetwork zal nu de juiste pagina afbeelden.
<item nr="31" show="mesoID" link="mesomaps/wnSpecificInc.php" caption="WeatherNetwork" title="Local Weather Exchange Stations" head='mesomaps/wnSpecificCSS.php' />
Als u de naam van de menu keuze wilt aanpassen, kunt u het beste dit doen door in het local vertaalbestand voor uw taal de juiste regel aan te passen. Instructies over het vertaalbestand vindt u hier: Talen en de Leuven-Template
langlookup|WeatherNetwork|WeatherNetwork|
Bijvoorbeeld aanpassen naar
langlookup|WeatherNetwork|Benelux WN|