Skip to content

Icon Parameter

The Icon parameter is a 7 element, comma delimited array holding the settings used for defining if there is a weather icon displayed, it's position, NWS hyperlink, margin, if the hyper link should point to a different ZIP code or latitude and longitude pair, and border radius.

Icon[0] Size

By using the Size element you can tell the API what size, in pixels, you want the icon to be displayed. Any value between 10 and 999 inclusive is allowed. If none is sent, 56 is assumed. If the Position element isn't also sent, no icon will be shown.

Example

Icon[1] Position

By using the Position element you can tell the API where you want the icon to be shown. Allowed values are "left", "right" and "both".

Example

By using the Link element you can tell the API if you want the icon to have a hyperlink to either NOAA's National Weather Service Current Observations or Forecast page. Allowed values are "current" and "forecast".

Example

Icon[3] Margin

By using the Margin element you can tell the API what margin, in pixels, you want the icon to have. Integer values between 0 and 999 inclusive are allowed.

Example

Icon[4] Destination

By using the Destination element you can tell the API what destination you want NOAA's National Weather Service Forcast page to be pointed to when the Link element is set to "forecast". Either a 5 digit ZIP Code or a latitude and longitude pair are allowed. When sending a latitude and longitude pair, they must be seperated by an exclamation point. If none is sent, then the ICAO Station ID location is used.

Example

Icon[5] Border Radius

By using the Border Radius element you can tell the API what the icon border radius, in pixels, should be. Integer values between 0 and 255 are allowed.

Example

Icon[6] Kitties!

By using the Kitties! element you can tell the API to display random icons of cute kitties instead of the weather icons. This element has only one possible value: "kitty"

Example