OptionalbgColor?: stringThe background color of the skymap.
Optionalconstellations?: {Optionalboundaries?: { color?: string; data?: string; enabled?: boolean; width?: number }Optionalcolor?: stringThe color of the boundaries.
Optionaldata?: stringURI to the JSON file containing constellations boundaries data.
Optionalenabled?: booleanWhether constellation boundaries are displayed.
Optionalwidth?: numberThe width of the boundaries.
Optionallines?: {Optionalcolor?: stringThe color of the constellation lines.
Optionaldata?: stringURI to the JSON file containing constellations lines data.
Optionalenabled?: booleanWhether constellation lines are displayed.
Optionallabels?: { color?: string; data?: string; enabled?: boolean; fontSize?: number }Optionalcolor?: stringThe color of the labels.
Optionaldata?: stringURI to the JSON file containing constellations labels data.
Optionalenabled?: booleanWhether labels are displayed on the constellation lines.
OptionalfontSize?: numberThe font size of the labels.
Optionalwidth?: numberThe width of the constellation lines.
OptionalfontFamily?: stringThe font family used in the skymap. This should be a valid font name that is
installed on the page and available in the CSS. For example, "Arial", "Helvetica",
or any custom font loaded via @font-face. Ensure the specified font is accessible
in the browser to avoid fallback to a default font.
Optionalglow?: booleanToggle glow effect for stars and constellations. Can cause performance issues.
Optionalgrid?: { color?: string; enabled?: boolean; width?: number }Optionalcolor?: stringThe color of the grid lines.
Optionalenabled?: booleanWhether the grid is enabled.
Optionalwidth?: numberThe width of the grid lines.
Optionallanguage?: stringThe language used for labels. Available languages by default:
Optionalmoon?: {Optionalcolor?: stringThe color of the moon.
Optionalenabled?: booleanWhether the moon is displayed.
Optionallabel?: { color?: string; data?: string; enabled?: boolean; fontSize?: number }Moon label configuration.
Optionalcolor?: stringThe color of the moon label.
Optionaldata?: stringURI to the JSON file containing moon labels data.
Optionalenabled?: booleanWhether the moon label is displayed.
OptionalfontSize?: numberThe font size in px of the moon label.
Optionalscale?: numberA multiplier to scale default moon size.
Optionalplanets?: {Optionalcolor?: stringThe color of the planets. If undefined, a planet's color will be used.
Optionalenabled?: booleanWhether planets are displayed.
Optionallabels?: { color?: string; data?: string; enabled?: boolean; fontSize?: number }Labels for planets.
Optionalcolor?: stringThe color of the labels.
Optionaldata?: stringURI to the JSON file containing planets labels data.
Optionalenabled?: booleanWhether planet labels are displayed.
OptionalfontSize?: numberThe font size in px of the planet's labels.
Optionalscale?: numberA multiplier to scale default planet's size.
Optionalstars?: { color?: string; data?: string; enabled?: boolean; scale?: number }Optionalcolor?: stringThe color of the stars. If undefined, a default will be used.
Optionaldata?: stringURI to the JSON file containing star data.
Optionalenabled?: booleanWhether stars are displayed.
Optionalscale?: numberA multiplier to scale default star's size.
Optionalsun?: {Optionalcolor?: stringThe color of the sun.
Optionalenabled?: booleanWhether the sun is displayed.
Optionallabel?: { color?: string; data?: string; enabled?: boolean; fontSize?: number }Sun label configuration.
Optionalcolor?: stringThe color of the sun label.
Optionaldata?: stringURI to the JSON file containing sun labels data.
Optionalenabled?: booleanWhether the sun label is displayed.
OptionalfontSize?: numberThe font size in px of the sun label.
Optionalscale?: numberA multiplier to scale default sun size.
Clones this SkyMap instance, creating a new instance with the same configuration for another container.
The target div element where the skymap will be appended.
The SkyMap instance.
Disconnects SkyMap from container.
Renders the whole map.
Resizes the canvas while maintaining proper device pixel ratio (DPR) scaling.
The size in pixels for both width and height to create a square canvas.
The SkyMap instance.
Updates the sky map's date/time.
The new date/time for astronomical calculations.
The SkyMap instance for chaining.
Animates the change of date/time over a specified duration.
The new date/time for astronomical calculations.
Duration of the animation in milliseconds.
The SkyMap instance for chaining.
Updates the field of view (FOV).
The new field of view in degrees.
The SkyMap instance for chaining.
Updates the observer's latitude.
The new latitude in degrees.
The SkyMap instance for chaining.
Updates both the observer's latitude and longitude.
The new latitude in degrees.
The new longitude in degrees.
The SkyMap instance.
Animates the change of location (latitude and longitude) over a specified duration.
The new latitude in degrees.
The new longitude in degrees.
Duration of the animation in milliseconds.
The SkyMap instance for chaining.
Updates the observer's longitude.
The new longitude in degrees.
The SkyMap instance for chaining.
Replaces the current observer parameters with the given ones.
An object containing the new observer parameters:
latitude: The new latitude in degrees.longitude: The new longitude in degrees.date: The new date/time for astronomical calculations.fov: The new field of view in degrees.
SkyMap renders an interactive sky map on a canvas element.
It calculates positions of stars, planets, the Moon, the Sun, and constellation features using astronomical formulas and renders them based on a configurable visual style.
Param: container
The target div element where the canvas will be appended.
Param: observerParams
Observer parameters for location and time.
latitude: The new latitude in degrees.longitude: The new longitude in degrees.date: The new date/time for astronomical calculations.fov: The new field of view in degrees.Param: config
Configuration to customize colors, sizes, language, etc. Uses defaults for missing fields.