Eclipse Map

Interactive, customizable eclipse maps for your website

Embed an eclipse map on your own page

You can embed an interactive eclipse map directly on your website:

There are a number of advantages to this approach, compared to other methods:

  • Your visitors can explore the map without leaving your page (map can be zoomed and panned)

  • You can highlight exactly the area of interest to your audience (e.g. your county or state) without needing to obtain a custom map

  • The map marker can be positioned to show your exact location, along with customizable title and subtitle

  • There's no need to lookup and transcribe the local circumstances of the eclipse (times, magnitude, duration) - they are calculated and displayed automatically

  • Supports any solar eclipse between the years 1500 and 2500.

Embedding the eclipse map widget

The eclipse map can be included either via a simple iframe or embed tag on your web page. No JavaScript is required, and configuration is simple, via a handful of URL parameters:

<!DOCTYPE html>
    <title>Radiant Drift Eclipse Widgets</title>
    <meta charset="UTF-8" />

    <div id="app">
        <h1>Interactive Eclipse Map</h1>
        <p>Customizable, with pan and zoom</p>
          title="Eclipse Path"
                src=",-101&z=6&apiKey=[YOUR_API_KEY]&map=osm&date=2023-10-14&ll=31.9974,-102.0779&title=Midland, Texas&subtitle=Just north of the central path"

Try it now - edit the the following example on CodePen, replacing YOUR_API_KEY with (you guessed it...) your own API key:

Configuation options

The eclipse map can be configured using the following URL search parameters:




Required. A valid API key



Optional. Two comma-separated values, representing the latitude and longitude (negative west). When supplied, a map marker is shown at the given location.



Optional. Title string to be displayed in the map marker popover. This parameter has no effect if obs is omitted.



Optional. Subtitle text (string) to be displayed in the map marker popover. This parameter has no effect if obs is omitted.



Optional (but recommended). Two comma-separated values representing the latitude and longitude (negative west) on which the map should be centered.



Optional. Zoom level (integer) at which the map should be displayed. Supported values vary by selected map type, but are typically in the range 0 to 19. Higher values represent higher zoom levels (i.e. smaller map area displayed)



Optional. String value to select the displayed map type. Supported values are 'osm' (Open Street Map), 'ocm' (Open Cycle Map), 'top' (TopPlusOpen) (more coming soon).



Required. The date of the eclipse event to be displayed. Must be midnight UTC of the desired day. Format must be a value or dateString accepted by the JavaScript Date constructor. We recommend using YYYY-MM-DD for simplicity, e.g. 2024-04-08 for the Apr 8 2024 eclipse. (The time zone of your location does not matter - the value must be midnight UTC.)



Optional. A TZ identifier (time zone ID) to be used to format times displayed in the widget, e.g. Europe/Berlin or America/Denver. When omitted, the user's operating system time zone is used.

Last updated