Author Topic: Air Quality Script - Broken Map Images  (Read 915 times)

0 Members and 1 Guest are viewing this topic.

Offline K6GKM

  • CamWX.com
  • Contributor
  • ***
  • Posts: 131
    • CamWX
Air Quality Script - Broken Map Images
« on: July 17, 2023, 02:13:08 PM »
Hey Everyone,

I noticed today that the air quality map image links in the Relay Weather wxaqirss.php script add-on have broken, presumably due to changes at airnow.gov.  It seems they've transitioned to a GIS mapping system.  I don't suppose anyone has been able to figure out a workaround?

Thanks.
Grant Miles
Camarillo, CA, USA
Owner/Admin - CamWX.com
SKYWARN Spotter
Station Hardware: Davis Vantage Pro2 Plus w/ 24hr FARS
Station Software: Weather Display, Weather Message, FWI Calculator, StartWatch, with social media & messaging automation using Make.com, Twilio, and Brevo.


Offline K6GKM

  • CamWX.com
  • Contributor
  • ***
  • Posts: 131
    • CamWX
Re: Air Quality Script - Broken Map Images [Resovled - Update Available]
« Reply #1 on: July 18, 2023, 02:02:39 PM »
Worked on it some - I couldn't find a more elegant way to replace the map other than using an iframe to embed airnow.gov's interactive map to replace the broken images.  Happily there are no copyright worries since US Government websites are all in the public domain.  You'll just have to update the $aqiMapURL variable in the settings section to reflect the location you'd like to show on the map.  Demo at https://camwx.com/wxaqirss.php

Also included the graphics in case you're installing for the first time - drop in whatever location you define in $imagesDir ( ./ajax-images/ by default).

I also cleaned up a lot of the deprecated HTML tags, but couldn't quite figure them all out.

(Edited 9/22/23 to add the colored AQI buttons to the distribution and re-pack the directory structure)
« Last Edit: September 22, 2023, 03:09:45 PM by K6GKM »
Grant Miles
Camarillo, CA, USA
Owner/Admin - CamWX.com
SKYWARN Spotter
Station Hardware: Davis Vantage Pro2 Plus w/ 24hr FARS
Station Software: Weather Display, Weather Message, FWI Calculator, StartWatch, with social media & messaging automation using Make.com, Twilio, and Brevo.


Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 728
    • Lake Huron Weather
Re: Air Quality Script - Broken Map Images
« Reply #2 on: July 18, 2023, 08:20:26 PM »
Just wanted to say thanks for doing this.  I had tried for some time to fix mine and no joy, just don't have that skill.
Thanks again.  [tup]

CW3699

 

anything