% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/map_zoom.R
\name{nhm_map_flythrough}
\alias{nhm_map_flythrough}
\title{Multi-stage fly-through animation}
\usage{
nhm_map_flythrough(
  session,
  outputId,
  lat,
  lon,
  zoom = 80,
  stages = 5,
  duration_per_stage = 1200,
  pause_between = 200,
  start_lat = 0,
  start_lon = 0,
  start_zoom = 1,
  palette = "default",
  mapbox_layers = NULL,
  on_complete = NULL
)
}
\arguments{
\item{session}{The Shiny session object.}

\item{outputId}{The output ID of the \code{plotlyOutput}.}

\item{lat}{Target latitude.}

\item{lon}{Target longitude.}

\item{zoom}{Final projection scale. Higher values = more zoomed in.
Typical values: 3 continent, 8 country, 25 city, 80–150
building/street level.}

\item{stages}{Number of intermediate zoom stages (default 5).
More stages = smoother but slower journey.}

\item{duration_per_stage}{Milliseconds per stage. Default 1200.}

\item{pause_between}{Milliseconds pause between stages. Default 200.}

\item{start_lat, start_lon}{Starting position (default 0, 0 = globe
centre).}

\item{start_zoom}{Starting zoom level (default 1 = globe).}

\item{palette}{Colour palette for sub-unit borders.}

\item{mapbox_layers}{A named list of GeoJSON layer definitions
keyed by minimum zoom level. Each entry is a list of mapbox
layer specs (with \code{sourcetype}, \code{source}, \code{type},
etc.). Layers are swapped in as zoom increases. Ignored for
scattergeo maps.}

\item{on_complete}{Optional function called when animation finishes.}
}
\value{
Called for its side effect. Returns (invisibly) the total
animation duration in seconds.
}
\description{
Automatically generates intermediate zoom stages between the current
globe view and a target location, spacing zoom levels logarithmically
and enabling map features (countries, sub-units, rivers, lakes)
progressively as the zoom increases.
}
