Sunday 15 January 2012

php - NWS Weather Module API -


I am using the NWS weather module Bultin Block works great but I show the current temperature of the other two cities Want to They state the remake file.

The block defined by NWS_weather allows easy access to weather forecast data for a point that developers want to retrieve data for multiple points or which are more data (air speed, air Direction etc.), they can use this module by calling this function:

$ forecast = nws_weather_NDFDgen ($ lat, $ lon, array ('wdir', 'temp', 'Maxt', 'mint'), "time-series", "2009-12-08 t 12: 00: 00", "2009-12-09 t 12: 00: 00");

I'm not a developer and do not know how to use it. I am thinking that someone can give me some sample code, I can work with it. I am working with the 7.x-1.3 version. Thanks guys.

Please follow the steps:

    < Li> If you do not have the "PHP Filter" module enabled, enable it.
  1. Create a custom "block"
  2. Set physical content as follows:

      & lt ;? Php $ forecast = nws_weather_NDFDgenByDay ('47.55 ',' -122.30 '); Array ('daily maximum temperature', 'daily minimum temperature', 'status symbol',), 'display', 'echo' = ' = & Gt; array ('status symbol', 'weather type, coverage, and intensity', 'daily maximum temperature', 'daily minimum temperature',))); ? & Gt;   

    Here, 47.53 is latitude or latitude and -122.30 is long or longitude. To calculate the day calculation can also be passed. Like:

    $ forecast = nws_weather_NDFDgenByDay ('47.353, '-122.30', 7);

    This will load updates for 7 days.

    Then save the block. And set the currently created block in any field. See results at the front end :)

No comments:

Post a Comment