Author Topic: US National Temperatures map PHP script  (Read 9746 times)

0 Members and 1 Guest are viewing this topic.

Offline thomas

  • Senior Member
  • **
  • Posts: 61
Re: US National Temperatures map PHP script
« Reply #25 on: November 04, 2013, 09:20:39 PM »
I get the map but no data, what have I done wrong ?

http://grr-cascadewx.com/maps/usa-temps-map.php

Offline Bunty

  • Forecaster
  • *****
  • Posts: 1856
  • Home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: US National Temperatures map PHP script
« Reply #26 on: November 04, 2013, 09:26:23 PM »
I haven't tried it, but could do without the WIBW news logo.

Also the 2nd home page using modified AltDashboard 6.81 at http://stillwaterweather.com/wx/2ndhome.php

Offline sacreyweather

  • Echo Valley Weather
  • Forecaster
  • *****
  • Posts: 1542
    • Echo Valley Weather
Re: US National Temperatures map PHP script
« Reply #27 on: November 04, 2013, 09:28:41 PM »
Hi Bunty,

I opened the logo part in Paint.net and cut the wibw out of it, saved it and uploaded it.
CWOP: D2073, GR2AE, GR3, Cumulus, PWSweather,  CoCoRaHS: AR-SL-23  

Saline Weather on Twitter
Blitzortung Station 1387

Offline sacreyweather

  • Echo Valley Weather
  • Forecaster
  • *****
  • Posts: 1542
    • Echo Valley Weather
Re: US National Temperatures map PHP script
« Reply #28 on: November 04, 2013, 09:30:14 PM »
Thomas,

Where did you place the map and logo at? You also may want to locate the usa-temps-map.php file in your root directory and see if that works for you.

John
CWOP: D2073, GR2AE, GR3, Cumulus, PWSweather,  CoCoRaHS: AR-SL-23  

Saline Weather on Twitter
Blitzortung Station 1387

Offline sacreyweather

  • Echo Valley Weather
  • Forecaster
  • *****
  • Posts: 1542
    • Echo Valley Weather
Re: US National Temperatures map PHP script
« Reply #29 on: November 04, 2013, 09:31:18 PM »

What do you have for this line? My usa-temps-map.php file is in the root.
Code: [Select]

[code$dirbase   = dirname(__FILE__) . '/';      // current folder where PHP file is installed]


Hi Ryan,

Mine is located in my root directory, too.
CWOP: D2073, GR2AE, GR3, Cumulus, PWSweather,  CoCoRaHS: AR-SL-23  

Saline Weather on Twitter
Blitzortung Station 1387

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4046
    • Colorado Springs Weather
Re: US National Temperatures map PHP script
« Reply #30 on: November 04, 2013, 09:37:57 PM »
Code: [Select]
What do you have for this line?

[code$dirbase   = dirname(__FILE__) . '/';      // current folder where PHP file is installed]

Hi Ryan,

This line is right above the map base line in the new version of the script. Around line 67 or so.

Exactly what I have. I don't know why mine is not displaying correctly? This is what I get. http://www.hayskansasweather.com/usa-temps-map.php   This remains a mystery! #-o
« Last Edit: November 04, 2013, 09:40:12 PM by hayskswx »




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Hikvision HD IP Camera

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4046
    • Colorado Springs Weather
Re: US National Temperatures map PHP script
« Reply #31 on: November 04, 2013, 09:43:30 PM »
I haven't tried it, but could do without the WIBW news logo.

I opened it in Paint and used white marker to erase the logo and added my own.  :grin:




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Hikvision HD IP Camera

Offline sacreyweather

  • Echo Valley Weather
  • Forecaster
  • *****
  • Posts: 1542
    • Echo Valley Weather
Re: US National Temperatures map PHP script
« Reply #32 on: November 04, 2013, 09:50:39 PM »
That's strange, Ryan. Ours look just alike for the exception of the logo name.  I don't get that. I wonder if you need to put a "/" or even "./" on the front of these 3. Reason I say that is because of the differences in the way folks set up their servers.


$map_base  = $dirbase . 'images/usa-weather-base2.png';
$logo      = $dirbase . 'images/usa-hayswx-logo.png';

$text_font = $dirbase . 'fonts/franklin_medium_condensed.ttf';

CWOP: D2073, GR2AE, GR3, Cumulus, PWSweather,  CoCoRaHS: AR-SL-23  

Saline Weather on Twitter
Blitzortung Station 1387

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4046
    • Colorado Springs Weather
Re: US National Temperatures map PHP script
« Reply #33 on: November 04, 2013, 09:56:40 PM »
That's strange, Ryan. Ours look just alike for the exception of the logo name.  I don't get that. I wonder if you need to put a "/" or even "./" on the front of these 3. Reason I say that is because of the differences in the way folks set up their servers.


$map_base  = $dirbase . 'images/usa-weather-base2.png';
$logo      = $dirbase . 'images/usa-hayswx-logo.png';

$text_font = $dirbase . 'fonts/franklin_medium_condensed.ttf';



Mine is set up like /web

I tried a ./  and then just a / in front of all 3 and it was a no go.  :shock:
« Last Edit: November 04, 2013, 10:23:26 PM by hayskswx »




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Hikvision HD IP Camera

Offline dnavarrojr

  • Member
  • *
  • Posts: 34
    • WIBW News Now
Re: US National Temperatures map PHP script
« Reply #34 on: November 05, 2013, 10:46:56 AM »
Try putting all three files in the root directory and remove the folder from the filenames:

Code: [Select]
$map_base = $dirbase . 'usa-weather-base2.png';
$logo         = $dirbase . 'usa-wibw-logo.png';

$text_font  = $dirbase . 'franklin_medium_condensed.ttf';
Dave Navarro, Jr. - Director of Digital Media - Alpha Media USA
WIBW News Now - http://wibwnewsnow.com
Kansas Ag Network - http://kansasagnetwork.com
94.5 Country - http://94country.com
KGNC News Now - http://kgncnewsnow.com

Offline dnavarrojr

  • Member
  • *
  • Posts: 34
    • WIBW News Now
Re: US National Temperatures map PHP script
« Reply #35 on: November 05, 2013, 10:50:10 AM »
Any way of doing this with humidity, pressure, wind speed, and so on? Boy if there was and I could figure out what in sam hill to do to make it work  #-o I'd drop my subscription to my current service in a minute!

You can use anything from the XML file:

http://w1.weather.gov/xml/current_obs/KTOP.xml
Dave Navarro, Jr. - Director of Digital Media - Alpha Media USA
WIBW News Now - http://wibwnewsnow.com
Kansas Ag Network - http://kansasagnetwork.com
94.5 Country - http://94country.com
KGNC News Now - http://kgncnewsnow.com

Offline McLouthWX

  • Member
  • *
  • Posts: 38
    • McLouth Weather Live
Re: US National Temperatures map PHP script
« Reply #36 on: November 05, 2013, 02:56:08 PM »
Have it working here http://mclwx.info/wxareamap.php
Thanks, Dave
If you aren't confused, then you weren't paying attention.

CWOP - CW9610                    CoCoRaHS - KS-JF-4

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4046
    • Colorado Springs Weather
Re: US National Temperatures map PHP script
« Reply #37 on: November 05, 2013, 09:35:24 PM »
Try putting all three files in the root directory and remove the folder from the filenames:

Code: [Select]
$map_base = $dirbase . 'usa-weather-base2.png';
$logo         = $dirbase . 'usa-wibw-logo.png';

$text_font  = $dirbase . 'franklin_medium_condensed.ttf';

Don't work. Hey Thanks for the script. After 3 days of  ](*,) trying to get it to work I've had enough.




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Hikvision HD IP Camera

Offline DaculaWeather

  • It's a Jeep thing... you wouldn't understand.
  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3081
  • SCCA EM #156
    • North Georgia and US Weather
Re: US National Temperatures map PHP script
« Reply #38 on: November 06, 2013, 12:31:37 PM »
You all work too hard...
Give it a second to load, it's all experimental.
http://www.daculaweather.com/4_nws_graphical.php

Offline Bunty

  • Forecaster
  • *****
  • Posts: 1856
  • Home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: US National Temperatures map PHP script
« Reply #39 on: November 06, 2013, 02:59:12 PM »
You all work too hard...
Give it a second to load, it's all experimental.
http://www.daculaweather.com/4_nws_graphical.php

Your way is far better, can zoom in or out as much as I want.  It's one heck of an interactive weather map with national temps just the start.  Cool and well done.  From what I can tell the experiment is going well.

Also the 2nd home page using modified AltDashboard 6.81 at http://stillwaterweather.com/wx/2ndhome.php

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1759
    • SouthEast Lincoln, NE Weather
Re: US National Temperatures map PHP script
« Reply #40 on: November 06, 2013, 03:14:39 PM »
You all work too hard...
Give it a second to load, it's all experimental.
http://www.daculaweather.com/4_nws_graphical.php
Nice find, Steve!  \:D/  This brings together lots of high resolution graphics into one place while it sort of puts to shame the older lower resolution graphics.

There's even a map that displays a 'Cold Advisory for Newborn Livestock'! :-)

Clicking on a map also produces an interesting result.  I'm gonna put it an iframe, too.
« Last Edit: November 06, 2013, 03:17:35 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@inebraska.com

Offline DaculaWeather

  • It's a Jeep thing... you wouldn't understand.
  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3081
  • SCCA EM #156
    • North Georgia and US Weather
Re: US National Temperatures map PHP script
« Reply #41 on: November 06, 2013, 04:01:21 PM »
I did the survey and sent them my comments. I hope in the final version, they can bypass all of the header stuff on the page, and just load the map full screen like the EDD page. Enough surveys with comments asking for that will make our pages much easier to create and maintain.

Offline sacreyweather

  • Echo Valley Weather
  • Forecaster
  • *****
  • Posts: 1542
    • Echo Valley Weather
Re: US National Temperatures map PHP script
« Reply #42 on: November 06, 2013, 06:23:17 PM »
Thanks Steve, for the awesome find!!!

John
CWOP: D2073, GR2AE, GR3, Cumulus, PWSweather,  CoCoRaHS: AR-SL-23  

Saline Weather on Twitter
Blitzortung Station 1387

Offline katlon

  • LONNIE'S WEATHER STATION
  • Contributor
  • ***
  • Posts: 142
  • GO HEELS!!!
    • LONNIE'S WEATHER STATION
Re: US National Temperatures map PHP script
« Reply #43 on: November 27, 2013, 04:58:32 PM »
Can someone explain what needs to be changed in the script to save the image to a folder and then set up a cron job. Thanks.

Lonnie

Offline K3JAE

  • Contributor
  • ***
  • Posts: 119
  • Davis VP2 Wireless
    • K3JAE's Weather Station
Re: US National Temperatures map PHP script
« Reply #44 on: December 02, 2013, 06:26:50 AM »
I did the survey and sent them my comments. I hope in the final version, they can bypass all of the header stuff on the page, and just load the map full screen like the EDD page. Enough surveys with comments asking for that will make our pages much easier to create and maintain.

Hey, any reason why we can not share in this map? Would love to have that ability on my site. I would like to place that in an iframe only because it is generally wider than my viewing area.  Same thing with the EDD map. Any thoughts on offering to tot us poor folk who come nowhere near your talent level?


73's de K3JAE

John
K3JAE Weather Station

Offline DaculaWeather

  • It's a Jeep thing... you wouldn't understand.
  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3081
  • SCCA EM #156
    • North Georgia and US Weather
Re: US National Temperatures map PHP script
« Reply #45 on: December 02, 2013, 07:26:08 AM »
All of the NWS stuff is public domain, it's free to share.

Offline Bunty

  • Forecaster
  • *****
  • Posts: 1856
  • Home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: US National Temperatures map PHP script
« Reply #46 on: December 02, 2013, 02:05:55 PM »
Here's mine using this iframe:  <iframe src="http://preview.weather.gov/graphical/?zoom=5&lat=42&lon=-100.22163&layers=00BTTFTT&region=0&element=5&mxmz=true&barbs=false&subl=TTFFF&units=english&wunits=english"  scrolling="no" width="1200" height="900" style="background-color:navy;"></iframe>

Result:   http://stillwaterweather.com/nationaltemps.php

Also the 2nd home page using modified AltDashboard 6.81 at http://stillwaterweather.com/wx/2ndhome.php

Offline dnavarrojr

  • Member
  • *
  • Posts: 34
    • WIBW News Now
Re: US National Temperatures map PHP script
« Reply #47 on: December 03, 2013, 11:58:22 AM »
Sorry for being gone so long, been a busy holiday season so far.

I am re-working the code to support additional information besides the temperature and simplifying the whole thing.

I'm hoping to have it available before Christmas, but no promises.  I'm in the middle of two site redesigns and producing a new video branding package for our radio stations.

I'm also working on some scripts for creating images sized and designed for posting on Facebook.  We want to post weather image updates on our Facebook pages every 4 hours.  While I'll be able to post the scripts for creating those images, I can't post the script for automatic Facebook posts because it's something I bought and modified for my own purpose (http://codecanyon.net/item/facebook-page-post-generator/5556768).
Dave Navarro, Jr. - Director of Digital Media - Alpha Media USA
WIBW News Now - http://wibwnewsnow.com
Kansas Ag Network - http://kansasagnetwork.com
94.5 Country - http://94country.com
KGNC News Now - http://kgncnewsnow.com


Offline Bunty

  • Forecaster
  • *****
  • Posts: 1856
  • Home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: US National Temperatures map PHP script
« Reply #49 on: December 03, 2013, 08:03:24 PM »
Hi Bunty, I hope you don't mind that I borrowed your code http://komokaweather.com/komokaweather-ca/wxNWSweathermap.php

Paul

I really got inspiration for it from Steve at Dacula weather, so we both owe him thanks.  Thanks, Steve. 

Also the 2nd home page using modified AltDashboard 6.81 at http://stillwaterweather.com/wx/2ndhome.php

 

anything