Author Topic: Silly AJAX for VWS Question for Ken  (Read 1463 times)

0 Members and 1 Guest are viewing this topic.

Offline CNYWeather

  • Forecaster
  • *****
  • Posts: 2297
    • CNYWeather
Silly AJAX for VWS Question for Ken
« on: December 20, 2008, 12:00:30 PM »
Ken, I've been working with another guy near me running WD without a website, and have him uploading his clientraw.txt
to my site and i'm ajaxing his data. He;ll be doing his testtags and trends soon too.

Can a ajax-dashboard template up for others near me using VWS work too?
There are 3 or 4 using VWS.

Yeah, I have nothing better to do, HAHA  :grin:
Tony




Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Silly AJAX for VWS Question for Ken
« Reply #1 on: December 20, 2008, 01:35:12 PM »
It's possible, but not necessarily straight forward.

First, the AJAX can only load files from the same domain the script is loaded from (that's a built-in limitation to the JavaScript XMLHttpRequest() function that only a URI path can be specified).  This means that the WeatherFlash files would have to be loaded to your website in directories.  You could 'fake' the script out by having it load a PHP which would access and make a local copy of the file from the other site, but it's a bit of bother to get it working smoothly.

Secondly, the current dashboard is specifically for Weather-Display use .. the testtags.php has WD variables in it, and would have to have VWS variables substituted for the corresponding WD tags.  And... not all the WD tags used have corresponding VWS tags, so some of the dashboard code would have to be rewritten (or removed) to make a VWS dashboard work.

Hey.. it looks like a cold winter, so maybe you can keep warm with some hot coding :)

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline CNYWeather

  • Forecaster
  • *****
  • Posts: 2297
    • CNYWeather
Re: Silly AJAX for VWS Question for Ken
« Reply #2 on: December 20, 2008, 01:38:52 PM »
gotcha.

It probably would be easier creating a county mesomap like
the North East, South West Mesomaps, etc etc.

Is there coding available for that anywhere?

Thanks,
Tony
Tony




Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Silly AJAX for VWS Question for Ken
« Reply #3 on: December 20, 2008, 02:28:48 PM »
Maybe easier, maybe not ...

I developed the code for the regional weather network mesomaps.  In order to run it, you'll need:
1) cron functionality on your website to run a script every 5 minutes to pull conditions from stations to appear on the mesomap.
2) a map background (usually derived from a NexStorm .cvm map of the area to cover)
3) maintenance of a control file (for station information), a multi-layered map graphic (in Paint.net format) for station locations, and the PHP for mesomap generation and cache loading.

The big one is for cron functionality on the website .. without that, the mesomap gets real slow as it has to fetch conditions 'while-you-wait' and each station adds a new time delay before display.

Currently, there are 17 unique networks running the mesomap with 509 stations worldwide reporting to their respective regional networks.

Let me know if you're still interested in setting up a small mesomap.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline CNYWeather

  • Forecaster
  • *****
  • Posts: 2297
    • CNYWeather
Re: Silly AJAX for VWS Question for Ken
« Reply #4 on: December 20, 2008, 04:17:58 PM »
I was looking at the mesomap on WD. It's not bad
but the regional ones look much nicer.

I'm on Godaddy.com. I looked and cron jobs can be run and
I can set them for 5 minute intervals.

I think NEWN used my Nexstorm map so I got that covered.

I'm game Ken.  :grin:
Tony




 

anything