home > observing > sky chart

…continued

How to Link to S&T's Interactive Sky Chart
by Richard Tresch Fienberg

Simple Text Links

When you're on SkyandTelescope.com and launch the applet, you don't get a sky chart until you've specified your location and time zone and indicated whether daylight-saving time is in effect. Once you've provided these inputs, the applet opens with a simulation of the evening sky at 9 p.m. local time on the current date. From any other Web site, you can launch the applet and go straight to a chart of tonight's sky via a link formatted to include, at minimum, the following four parameters:

  • lat = latitude in decimal degrees; –90.00 (S) to +90.00 (N)
  • lng = longitude in decimal degrees; –180.00 (W) to +180.00 (E)
  • timezone = time-zone offset in hours from UT; –12 (W) to +14 (E)
  • dst = daylight-saving time on or off.

To build a link, you use a standard HTML tag of the form <a href="URL">link text</a>. Here's an example for the US city of Toledo, Ohio, which is at latitude 41.67°N, longitude 83.57°W, in the Eastern time zone (5 hours west of Greenwich), during summer:

<a href="http://skychart.Skytonight.com/observing/skychart/skychart.asp?
lat=+41.67&lng=-83.57&timezone=-5&dst=on&">Tonight's Sky over Toledo, Ohio</a>

Note that the parameters follow the question mark, and each parameter is itself followed by an ampersand (&). In the example shown, the HTML breaks onto two lines; make sure that in your own HTML everything runs together, i.e., that there's no line break or space after the question mark. Here's the active hyperlink built as described above:

Tonight's Sky over Toledo, Ohio

If you move your cursor over the link text, you'll see the corresponding URL in the status line at the bottom of your browser window. If you click on the link, Sky & Telescope's Interactive Sky Chart applet should load and then open to show tonight's sky over Toledo, Ohio, at 9 p.m. Eastern Daylight Time (which will be off by an hour if daylight-saving time is not currently in effect).



Sky Publishing, a New Track Media Company
Copyright © 2013 New Track Media. All rights reserved.
Sky & Telescope, Night Sky, and SkyandTelescope.com are registered trademarks of New Track Media