% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/map_zoom.R
\name{nhm_map_flyto}
\alias{nhm_map_flyto}
\title{Fly-to animation for plotly geo maps}
\usage{
nhm_map_flyto(
  session,
  outputId,
  lat,
  lon,
  zoom = 1,
  duration = 1500,
  geo_features = NULL,
  mapbox_layers = NULL
)
}
\arguments{
\item{session}{The Shiny session object.}

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

\item{lat}{Target latitude.}

\item{lon}{Target longitude.}

\item{zoom}{Projection scale (1 = whole globe, higher = more zoomed).
Typical values: 1 for global, 3 for continent, 6 for country,
15–25 for city.}

\item{duration}{Animation duration in milliseconds. Default 1500.}

\item{geo_features}{Optional named list of geo layout properties to
apply at the destination (e.g.
\code{list(showrivers = TRUE, showlakes = TRUE)}).}

\item{mapbox_layers}{Optional list of mapbox layer definitions
to apply before the animation starts. Used for swapping GeoJSON
boundary layers at different zoom levels.}
}
\value{
Called for its side effect (sends a message to the client).
}
\description{
Smoothly animates a plotly scattergeo map from its current view to a
target location by interpolating the projection centre and scale.
Requires the map output to include \code{\link{nhm_map_zoom_js}()}
so the JavaScript handler is registered.
}
