How to Link to S&T’s Interactive Sky Chart

Interactive Sky Chart
Sky & Telescope's Interactive Sky Chart shows the stars over any location, for any date and time.
Numerous webmasters have asked us how to link to Sky & Telescope's Interactive Sky Chart so that the Java applet will open with a particular observing location already specified. This could be handy, for example, if the members of an astronomy club want to get a chart of the sky over their observatory via a single click from the club's Web site. Ditto if you work for a local TV station and you want your viewers to know what bright stars and planets currently shine over your city or town. Here we provide simple instructions, along with a few graphics (including Sky & Telescope logos of different sizes) for creating such a link. But first, a few words from our legal department.

Copyright and Permissions

Sky & Telescope's Interactive Sky Chart is a proprietary Java applet copyrighted by Sky Publishing; please review our Terms & Conditions page for more information about what this means. You are hereby granted a limited, revocable, non-transferable, and non-exclusive right to create a hyperlink to our sky-chart applet, provided that no such link could reasonably be deemed to portray Sky Publishing or its products or services in a false, misleading, derogatory, or otherwise offensive manner. You may not use any Sky logo or other proprietary graphic or trademark as part of the link without express written permission, except as detailed in this article.

If you have any questions, please send an inquiry by e-mail to weblinks@SkyandTelescope.com.

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.skyandtelescope.com?
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).

Simple Graphical Links

A graphical link is identical to a text link, except that instead of link text (i.e., words) you use an image (via an <img> tag). When a user clicks on the image, he or she goes to the corresponding URL, which in this case will point to S&T's Interactive Sky Chart preset to a particular observing location for this evening at 9 p.m. local time.

Here's the earlier example using a small Sky & Telescope logo instead of the words "Tonight's Sky over Toledo, Ohio." As before, this is for latitude 41.67°N, longitude 83.57°W, in the Eastern time zone (5 hours west of Greenwich), during summer:

<a href="http://skychart.skyandtelescope.com?
lat=+41.67&lng=-83.57&timezone=-5&dst=on&">
<img src="http://d366w3m5tf0813.cloudfront.net/wp-content/uploads/smalllogo.gif" width="55" height="40"
border="0" alt="S&T's Interactive Sky Chart"></a>

Once again the HTML shown above breaks onto multiple lines; make sure that in your own HTML everything runs together, i.e., that there are no hard line breaks (carriage returns) or extraneous spaces. Please make sure you include border="0&quot (zero) in your <img> tag; otherwise the S&T logo will probably appear with a thick blue line around it, which we don't want.

Here is the active graphical hyperlink built as described above:


S&T's Interactive Sky Chart

This example pulls a graphic from the SkyandTelescope.com Web server. You may do that if you wish, but it won't work if our server goes down, which sometimes happens. It makes more sense to copy our graphics to your own server and pull them from there by specifying the correct path in the "src" part of your <img> tag. To copy any of the graphics on this page to your own computer, right-click (on a PC) or click-and-hold (on a Mac) your mouse button, then choose the "Save picture as" (or similar) option from the menu that pops up.

Here are two more S&T logos and another graphic you may use for your links::


S&T's Interactive Sky Chart     S&T's Interactive Sky Chart     S&T's Interactive Sky Chart

If you need an S&T logo of a different size, or if you have any questions about the use of our proprietary graphics on your Web site, please send an e-mail to weblinks@SkyandTelescope.com.

The remainder of this article tells how to find your latitude, longitude, and time zone and explains how to use additional parameters to create more complex, elaborate links to our sky-chart applet.

How to Find Your Latitude and Longitude

One way to determine your city's latitude and longitude is to use the Interactive Sky Chart itself. Click the "change" button next to the word "LOCATION" just below the Interactive Sky Chart logo. The next screen you see, entitled Choose Location, will contain the fields shown at left. For a city in the USA or Canada, fill out the first (top) part of the form and click SUBMIT. For a city in any other country, fill out the second part of the form and click SUBMIT.

The next screen, entitled Choose Time Zone, will report your city's latitude and longitude, as shown at right for Toledo, Ohio. Write down the latitude and longitude (both in degrees and arcminutes) and, while you're at it, make a note of the two-letter state/province abbreviation (in this case, OH) and country code (in this case, US) that appear to the right of the city name.

Now convert the latitude and longitude to decimal degrees; simply divide the arcminute value by 60 (because there are 60 arcminutes in 1 degree) and add the result to the degree value. For Toledo, Ohio, we get latitude = 41 + (40/60) = 41.67°N and longitude = 83 + (34/60) = 83.57°W. What about the sign? Use + for N latitude and E longitude, and – for S latitude and W longitude. So for Toledo, Ohio, we have lat = +41.67 and lng = -83.57.

You can also find the latitude and longitude of almost any city on Earth by following the links from WorldAtlas.com.

Time Zone and DST

If you're not sure of your time-zone offset in hours west (–) or east (+) of UT (Universal Time, essentially the same as Greenwich Mean Time), use the Time Zone pull-down menu on the Choose Time Zone screen. Note that this menu shows standard time, which is what we want. The example at left shows that Eastern Time (Toledo's time zone) is 5 hours west of UT, or timezone = -5.

If daylight-saving time is being observed, then dst = on. If not, dst = off. Note that this cannot be determined automatically — you have to set it manually. This means that if you build a link when DST is in effect, you'll need to modify it later when your area reverts to standard time (or vice versa), and again when DST goes back into effect, etc. Sorry about this little inconvenience!

Another good source of worldwide time-zone and DST information is the World Clock.

Further Refinements (More Parameters)

Control Panel
Control panel without city, state, country.
If you specify only the latitude and longitude of your observing location, the sky chart opens with the control panel shown at left. You'll see the latitude and longitude, but not the name of the city, state/province (USA/Canada), or country. If you'd like to add these, you'll need to add the following parameters to your link:

  • city = name of city; use %20 for blank spaces (e.g., La%20Paz)
  • state = two-letter abbreviation for state/province (USA/Canada only)
  • country = two-letter abbreviation for country

Adding these parameters to our earlier link for Toledo, Ohio (you wrote them down as shown on the Choose Time Zone screen, didn't you?), results in the following HTML expression:

<a href="http://skychart.skyandtelescope.com?
lat=+41.67&lng=-83.57&timezone=-5&dst=on&
city=Toledo&state=OH&country=US&">Tonight's Sky over Toledo, Ohio</a>

Try it! Here's the active hyperlink:


Tonight's Sky over Toledo, Ohio

Control Panel
Control panel with city, state, country.
(Again, the HTML shown above breaks onto multiple lines; make sure your own HTML contains no line breaks or extraneous spaces.) Now when the sky-chart applet launches, its control panel should show not only the latitude and longitude, but also the city, state, and country, as at right. Everything else should be exactly as before.

All-Sky Chart or Selected View

All-Sky View
All-sky view, maximized.
By default, the applet opens with the combined view, showing an all-sky chart on the right of the screen and a naked-eye view of a selected region (denoted by the green box in the all-sky chart) at upper left. By adding more parameters to your link, you can make the sky chart open with either the all-sky chart or the selected view alone:

  • allskyMax = true if you want the all-sky chart alone
  • selectedMax = true if you want the selected view alone

    Selected View
    Selected view, maximized.
    By default, the selected view opens facing due west. You can make it open facing any other direction by specifying two more parameters:

  • caz = azimuth of selected viewing direction, in degrees
  • calt = altitude of selected viewing direction, in degrees

Azimuth is measured around the horizon, from north (0°) to east (90°) to south (180°) to west (270°) and back to north. So, for example, to open the selected view facing toward the southwest, set selectedMax = 225.

Altitude is measured vertically, from straight ahead toward the horizon (0°) to straight overhead toward the zenith (90°). If you omit the calt parameter, the selected view opens in its default mode, which has the horizon at the bottom. To look higher in the sky, try setting calt to some value between 30 and 60.

Open the Sky Chart in a New Window

If you want the sky chart to open in a new browser window — so that your own site will remain open in the original window — just add the standard HTML "target" parameter to your link, naming the new window whatever you'd like (for example, target="new_window").

Putting it all together, here's a text link to open a new browser window showing Sky & Telescope's Interactive Sky Chart for tonight's sky over Toledo, Ohio, showing only the selected view facing southwest and looking halfway from straight ahead to straight up:

<a href="http://skychart.skyandtelescope.com?
lat=+41.67&lng=-83.57&timezone=-5&dst=on&city=Toledo&
state=OH&country=US&selectedMax=true&caz=225&calt=45&"
target="new_window">Tonight's Sky over Toledo, Ohio</a>

Try it! Here's the active hyperlink:


Tonight's Sky over Toledo, Ohio, Looking High in the Southwest

The corresponding graphical link looks like this:

<a href="http://skychart.skyandtelescope.com?
lat=+41.67&lng=-83.57&timezone=-5&dst=on&city=Toledo&
state=OH&country=US&selectedMax=true&caz=225&calt=45&" target="new_window">
<img src="http://d366w3m5tf0813.cloudfront.net/wp-content/uploads/smalllogo.gif" width="55" height="40"
border="0" alt="S&T's Interactive Sky Chart"></a>

Here's the real thing:


S&T's Interactive Sky Chart

Pretty neat, huh? If you're really ambitious, you can experiment with still more parameters. Here are a few of particular interest:

  • datetime = date and time at which sky chart opens, in this format: YYYY.MM.DDatHH:MMAP, where YYYY = year, MM = month, DD = day, HH = hour, MM = minute, and AP = AM or PM; if MM, DD, HH, and/or MM are less than 10, use a leading zero

    Example: datetime=2003.09.25at10:45PM& to open the applet showing the sky at 10:45 p.m. on September 25, 2003. Don't forget to include the ampersand (&) at the end.

  • setLocation = true if, rather than setting an observing location yourself, you want the applet to open with the Choose Location dialog box open so that the user can specify his or her own location

    Example: setLocation=true&

    You should omit any parameters you don't need, and if you run into any problems, you should double-check that all the necessary parameters are present, beginning with the four basic ones: latitude (lat), longitude (lng), time-zone offset (timezone), and DST toggle (dst).

    Good luck, have fun, and clear skies!

One thought on “How to Link to S&T’s Interactive Sky Chart

  1. pedro-barjuch

    cuando intento abrir el cielo de las estrellas aparece ERROR DE APLICACION NUMBER FORMAT EXCEPTION

    Pueden darme instrucciones para corregir este error y abrir el grafico ?

    Gracias por su colaboracion

Comments are closed.