Page 2 of 5 FirstFirst 12345 LastLast
Results 11 to 20 of 44

Thread: Weather app broken

  1. #11
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    718
    Don't worry. I didn't use that part of it. I didn't copy your code. Just looked through the URLs for the API and the icons.

    My icon is coming from:

    http://i.uk.imwx.com/global/images/93x93/" & tempCode & ".png"

    Where tempCode is the values specified for the "code" under the "conditions" block.


    EDIT:
    Didn't even realize you had a separate sub for getting more icons. I'll take a look into that part of it today. I looked at weather.com, but couldn't find a way to look up their codes (like UKXX1090) without a dev key.
    Last edited by ClockWorK; 09-17-2012 at 06:55 AM.

  2. #12
    FLAC SNOtwistR's Avatar
    Join Date
    Nov 2009
    Location
    Keswick,On Canada
    Posts
    1,619
    Weather works perfect! I just need a way to show C instead of F. SNO

  3. #13
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    718
    cdrskull,

    I think I just found a better way to get the icons for the other days of the forecast.

    http://developer.yahoo.com/weather/#codes

    Turns out, the descriptions are constant (even across weather services), and they are mapped to codes on the site above.

  4. #14
    FreeDrive Creator CdRsKuLL's Avatar
    Join Date
    Feb 2004
    Location
    Manchester
    Posts
    3,507
    Quote Originally Posted by ClockWorK View Post
    cdrskull,

    I think I just found a better way to get the icons for the other days of the forecast.

    http://developer.yahoo.com/weather/#codes

    Turns out, the descriptions are constant (even across weather services), and they are mapped to codes on the site above.
    I tried this first but the condition's I was getting didn't match. They had AM and PM in and Rainy and a few others that just didn't match up :-( I even typed them all out only to find this after :-(


    Code:
     Function grabicon(ByVal condition As String) As String
            condition = "http://l.yimg.com/a/i/us/we/52/"
            Select Case condition
    
                Case "tornado"
                    condition += "0.gif"
                Case "tropical storm"
                    condition += "1.gif"
                Case "hurricane"
                    condition += "2.gif"
                Case "severe thunderstorms"
                    condition += "3.gif"
                Case "thunderstorms"
                    condition += "4.gif"
                Case "mixed rain and snow"
                    condition += "5.gif"
                Case "mixed rain and sleet"
                    condition += "6.gif"
                Case "mixed snow and sleet"
                    condition += "7.gif"
                Case "freezing drizzle"
                    condition += "8.gif"
                Case "drizzle"
                    condition += "9.gif"
                Case "freezing rain"
                    condition += "10.gif"
                Case "showers"
                    condition += "11.gif"
                Case "showers"
                    condition += "12.gif"
                Case "snow flurries"
                    condition += "13.gif"
                Case "light snow showers"
                    condition += "14.gif"
                Case "blowing snow"
                    condition += "15.gif"
                Case "snow"
                    condition += "16.gif"
                Case "hail"
                    condition += "17.gif"
                Case "sleet"
                    condition += "18.gif"
                Case "dust"
                    condition += "19.gif"
                Case "foggy"
                    condition += "20.gif"
                Case "haze"
                    condition += "21.gif"
                Case "smoky"
                    condition += "22.gif"
                Case "blustery"
                    condition += "23.gif"
                Case "windy"
                    condition += "24.gif"
                Case "cold"
                    condition += "25.gif"
                Case "cloudy"
                    condition += "26.gif"
                Case "mostly cloudy night"
                    condition += "27.gif"
                Case "mostly cloudy day"
                    condition += "28.gif"
                Case "partly cloudy night"
                    condition += "29.gif"
                Case "partly cloudy day"
                    condition += "30.gif"
                Case "clear night"
                    condition += "31.gif"
                Case "sunny"
                    condition += "32.gif"
                Case "fair night"
                    condition += "33.gif"
                Case "fair day"
                    condition += "34.gif"
                Case "mixed rain And hail"
                    condition += "35.gif"
                Case "hot"
                    condition += "36.gif"
                Case "isolated thunderstorms"
                    condition += "37.gif"
                Case "scattered thunderstorms"
                    condition += "38.gif"
                Case "scattered thunderstorms"
                    condition += "39.gif"
                Case "scattered showers"
                    condition += "40.gif"
                Case "heavy snow"
                    condition += "41.gif"
                Case "scattered snow showers"
                    condition += "42.gif"
                Case "heavy snow"
                    condition += "43.gif"
                Case "partly cloudy"
                    condition += "44.gif"
                Case "thundershowers"
                    condition += "45.gif"
                Case "snow showers"
                    condition += "46.gif"
                Case "isolated thundershowers"
                    condition += "47.gif"
                Case Else
                    condition += "3200"
            End Select
            Return condition
        End Function
    I changes some of the titles so they will need changing back but it might save you 10 mins .. lol This is why I then went out to weather.com wap site and stripped the icon links

  5. #15
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    718
    Yeah, I noticed the same thing after I posted and started looking into it. I think I'll try building (adding to) the description table, and maybe getting the icon from
    "http://l.yimg.com/os/mit/media/m/weather/images/icons/l/" & tempCode & "d-100567.png" instead.

  6. #16
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    718
    Updated.
    Added support for metric units in weather.
    Added images for forecast, but it's probably not going to be 100% right off the bat.
    Also some DAB fixes.

  7. #17
    FLAC SNOtwistR's Avatar
    Join Date
    Nov 2009
    Location
    Keswick,On Canada
    Posts
    1,619
    Works well, celsius, icons, and actual forecasts all match up, just font autoscaling needs alittle fine tuning. Great work! SNO

  8. #18
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    718
    I need a few more confirmations that weather is working. It works fine on both of my test machines, but weather hasn't come up in my car since yesterday morning. Not sure what the issue would be.

    As for the font scaling, I just need to shorten the day of the week to 3 chars for "Tue", "Wed", etc.

  9. #19
    FLAC SNOtwistR's Avatar
    Join Date
    Nov 2009
    Location
    Keswick,On Canada
    Posts
    1,619
    It looks like something is broken, I just tried in my truck and its shows location but no data and the test box was still working this morning but as soon as I restarted DL it shows no data on that box. SNO

  10. #20
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    718
    Give it a minute to refresh, just to be sure.

    But yeah, that's what's happening. But it's working fine on my test machines. And I can't think of anything that I would have broken between then and now. If I had left a hard-coded location in the program, you'd be getting weather for Detroit, but the fact that nothing comes up is confusing. And debugging in the car just sucks. Almost wondering if they started to block mobile IPs or something. I'm going to tether one of my test machines to my phone and see if it still works. But it worked yesterday morning while tethered.

    The geo-location data comes from google, and the weather comes from Yahoo, so they are independent.

Page 2 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. Replies: 131
    Last Post: 08-09-2008, 06:24 AM
  2. Replies: 0
    Last Post: 04-21-2008, 02:56 PM
  3. Add Interactive Weather Map (Weather.com) to CF?
    By Jistari in forum CF Plugins
    Replies: 4
    Last Post: 02-19-2008, 10:00 PM
  4. Anyone have weather.zip (the weather files)?
    By dmurray14 in forum Road Runner
    Replies: 1
    Last Post: 02-06-2006, 05:49 PM
  5. Replies: 6
    Last Post: 12-06-2004, 02:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •