Hello, I want to use weather icons that are uploaded on the internet. How can I do that?
The link is : https://ssl.gstatic.com/onebox/weather/48/sunny.png
The icons are named after each weather condition (or at least I think... I found the link by inspecting google weather icon's and I think it works that way), so I have a measure that holds the name of the condition that goes like:
I am skeptical in the extreme that the .jpg name of the icon is going to consistently match the condition name you are getting, generally a weather feed returns the icon as a number, as in the "48" above, and you would use that to match to an image.
You do not have the required permissions to view the files attached to this post.
I am skeptical in the extreme that the .jpg name of the icon is going to consistently match the condition name you are getting, generally a weather feed returns the icon as a number, as in the "48" above, and you would use that to match to an image.
jpg? I'm not sure I follow.. ins't that a png image? but yea, I'm not sure about the consistency of the link either.... I only found out about this by playing around today, maybe tomorrow that 48 becomes 49 or 29... who knows... I'll check on it to see how it works in a span of a week/
I tried playing the "48" parameter in the link but putting other numbers resulted in a non-working link, whereas putting weather conditions, returned the corresponding image.
kyriakos876 wrote:jpg? I'm not sure I follow.. ins't that a png image? but yea, I'm not sure about the consistency of the link either.... I only found out about this by playing around today, maybe tomorrow that 48 becomes 49 or 29... who knows... I'll check on it to see how it works in a span of a week/
I tried playing the "48" parameter in the link but putting other numbers resulted in a non-working link, whereas putting weather conditions, returned the corresponding image.
Yeah, sorry, I meant .png.
A link must be exact, so yeah, if you are going to link to those images directly, you will need both the "48" or whatever number it is on any given day, and the "sunny", or whatever condition name it is using. I don't hold out a lot of hope for this working over time.
A link must be exact, so yeah, if you are going to link to those images directly, you will need both the "48" or whatever number it is on any given day, and the "sunny", or whatever condition name it is using. I don't hold out a lot of hope for this working over time.
Neither do I but only experimenting will let us know... Also, for some reason the code your sent above works on a test as a code alone, but when I try to implement it into my own code, I don't see the icon, what am I doing?
kyriakos876 wrote:Neither do I but only experimenting will let us know... Also, for some reason the code your sent above works on a test as a code alone, but when I try to implement it into my own code, I don't see the icon, what am I doing?
I even used another measure to make sure it's a string... maybe stupid but I tried it as seen above.
I just used a String measure as a shortcut, since don't have any part of your skin that lets me get the condition name with WebParser. I would think you could just directly use the value of [CurrentConditionsChild] to download the icon.
As to why what you have isn't working, not sure, what are the measures values in About / Skins?
You are likely going to need a FinishAction on [CurrentConditionsParent] that updates [MeasureGetIcon] when it is done getting stuff. This is because both will be updated when the skin refreshes, but when [MeasureGetIcon] first fires, there won't yet be any values returned by [CurrentConditionsParent], and it won't try again for 10 minutes.
balala wrote:What would be the URL for all those images? Because there should have to be a lot of such URLs, I suppose.
I may be missing something, but I see no hope in this working. You are going to have to know and use both the number, like "48", and the name, like "sunny" to build the URL for the download measure. I am very, very skeptical that the name, like "sunny" is going to consistently match the text used for "conditions". There are hundreds of condition descriptions, and they are not going to create hundreds of different icons, when "partly sunny" and "partly cloudy" more or less mean the same thing.
jsmorley wrote:I just used a String measure as a shortcut, since don't have any part of your skin that lets me get the condition name with WebParser. I would think you could just directly use the value of [CurrentConditionsChild] to download the icon.
As to why what you have isn't working, not sure, what are the measures values in About / Skins?
Ah nevermind... My weather link changed to "Fair" and google changed to "http://ssl.gstatic.com/onebox/weather/64/sunny_s_cloudy.png"
I guess that's not how it works then. Kinda expected, but also disappointed... I'd like downloading the icons temporary rather than having them in the #@# folder.