% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggplot_theme.R
\name{nhm_world_map}
\alias{nhm_world_map}
\title{NHM-themed interactive world map}
\usage{
nhm_world_map(
  palette = "default",
  projection = "natural earth",
  data = NULL,
  lat = NULL,
  lon = NULL,
  label = NULL,
  customdata = NULL,
  marker_size = 10,
  hover_size = 18,
  marker_colour = NULL,
  marker_values = NULL,
  colour_limits = NULL,
  ramp_colours = NULL,
  show_controls = FALSE,
  allow_zoom = FALSE,
  show_colorbar = FALSE,
  colorbar_title = "",
  ...
)
}
\arguments{
\item{palette}{Character. Passed to \code{\link{nhm_colours}}.}

\item{projection}{Map projection type. Defaults to
\code{"natural earth"}.}

\item{data}{Optional data frame of marker locations.}

\item{lat, lon}{Column names (as formulas, e.g. \code{~lat}) for
latitude and longitude in \code{data}.}

\item{label}{Column (formula) used as the hover label.}

\item{customdata}{Column (formula) of HTML strings shown on click.}

\item{marker_size}{Base marker size in pixels (default 10).}

\item{hover_size}{Marker size on hover (default 18).}

\item{marker_colour}{Marker fill colour. Used when
\code{marker_values} is \code{NULL}. Defaults to the palette lime
colour.}

\item{marker_values}{Optional numeric vector (or formula) of values
used to colour markers on a continuous scale via
\code{\link{nhm_colour_ramp}}. When supplied, \code{marker_colour}
is ignored.}

\item{colour_limits}{Length-2 numeric vector giving the value range
for the colour ramp. Defaults to the range of \code{marker_values}.}

\item{ramp_colours}{Character vector of colours for the continuous
ramp. Passed to \code{\link{nhm_colour_ramp}}.}

\item{show_controls}{Logical. Whether to show the plotly mode bar.
Defaults to \code{FALSE}.}

\item{allow_zoom}{Logical. Whether to allow scroll-wheel zooming.
Defaults to \code{FALSE}.}

\item{show_colorbar}{Logical. Whether to display a colour scale
legend alongside the map. Only used when \code{marker_values} is
supplied. Defaults to \code{FALSE}.}

\item{colorbar_title}{Title text for the colour bar. Defaults to
\code{""}.}

\item{...}{Additional arguments passed to \code{plotly::layout()}.}
}
\value{
A plotly object with the styled base map (and markers if
\code{data} was provided).
}
\description{
Creates a plotly geo object with an outline world map styled in NHM
dark theme colours. Optionally adds markers with hover-enlarge
behaviour and click event support.
}
\details{
When \code{data} is supplied the function adds a \code{scattergeo}
marker trace automatically. Markers enlarge on hover and shrink back
on unhover. The plotly click event is registered so that
\code{plotly::event_data("plotly_click")} can be used in Shiny to
read \code{customdata} from the clicked point.
}
