Web Weather > Weather Website PHP/AJAX scripting
Ajax Website Not Updating
Hfcomms:
Ken,
Thanks for the info. I don't want to violate someone else's images as I sure want to do it right. Was looking at your page and you have the weather underground radar display using carterlake's scripts. I might try to set that one up for my radar page. Looking at his scrips he wants you to pull down the graphics from his site, i.e. "http://www.carterlake.org/radar1.gif" ect. Question would be do I need another folder in the public_html to put these .gif's?? Or can I dump them in an existing image folder or something. (updated later...found the answer to that one. Put them in the home directory) Also are there any helps for selecting all the multiple sourcing information in the script. My home radar would be KMQT or just MQT. So in the default script would I just have to remove the "OAX" radar identifier in each spot and insert "MQT" or is there more to it?? (updated later...everywhere I found the OAX identifier I put in MQT)
I understand like the other .php scripts that the script itself would go in the home directory. Using the wx3 page what .php code would need to be put into that page for it to work?? I'm guessing that the " <img src="http://icons.wunderground.com/data/640x480/2xradara4.gif" alt="Radar" width="640" height="480"></img>" would have to come out and the appropriate php code inserted at that point. Also guessing that wx3 would have to be uploaded as wx3.php as well. Thanks for all the assistance guys. Just want to make it better.
Hfcomms:
Additional questions.....
I have it partially running. I'm currently accessing under www.bigbaywx.com/radartest.php
The first question and I know I'll add to it is how to set the lat/long in the .php for the location. It's still defaulting to "carter lake" location of course even though I have replaced some of the tags with "big bay". The existing script has the following for the carter lake location as an example. I'm taking this from the code for the radar 1 map as a partial line.......
"<span style="position: relative; left: 0px; top: 0px"><img src="http://radblast.wunderground.com/cgi-bin/radar/WUNIDS_map?station=MQT&brand=wui<?php echo $AnText; ?>&type=N1R&frame=0&scale=0.125&noclutter=0&t=1120003015&lat=0&lon=0<?php echo $TrText;"
I'm not sure if the code before the lat/long has anything to do with the static location. The rough location for my station is 46.44.38N by 87.39.05W
Hfcomms:
Well,
Making a lot of progress here and answering a lot of my own questions with trial and error. Figured out how to plot my locations on the various maps. What a pain in the tail!!! I'm going to save this script in a couple of different places. I think I hate plotting pixels. LOLOLOL ](*,)
O.K.
Still have some questions that I will need help on. First of all I will still need the php code that I have to insert into the wx3local.html in order to change it to wx3.php and load the radartest script.
Secondly there is a mapping problem that I cant figure out how to fix. Look at this location as a shortcut. That radar map has to shift way to the left and up. Marquette or preferably Big Bay needs to be centered in the radar display. http://www.bigbaywx.com/radartest.php?mode=1&animated=0&track=0&advisories=0&lightning=0
The existing script for this radar has this partial line as a default "0&t=1120003015&lat=46.7438&lon=-87.6513<?php echo $TrText; ?>&map.x=400&map.y=240¢erx=150¢ery=203&transx=-227&transy=-37" I'm not quite sure what to change on that without messing it up. I didn't have to change the default mapping on any of the others.
Making progress!!
jmcmurry:
For getting the map you want, what I did was go to wunderground and center on my location. When you have what you want, right click on the image and select properties. The url there is what you want to place in your code. Do this for the different zoom levels that you desire and you'll be all set.
As for the .php extension, that is changed in the upload portion of Internet File Creation & Uploads.
Good luck. - Jim
Navigation
[0] Message Index
[*] Previous page
Go to full version