Skip to contents

Updates one setting of a flowmap layer.

Usage

set_flowmap_settings(map, id, name, value)

Arguments

map

A map object created by mapboxgl() or maplibre(), or a proxy object created by mapboxgl_proxy() or maplibre_proxy().

id

The ID of the flowmap layer to update.

name

The setting name to update. Supported canonical FlowMapGL setting names are opacity, colorScheme, darkMode, fadeAmount, highlightColor, locationsEnabled, locationTotalsEnabled, locationLabelsEnabled, flowLinesRenderingMode, flowLineThicknessScale, flowLineCurviness, clusteringEnabled, clusteringAuto, clusteringLevel, fadeEnabled, fadeOpacityEnabled, adaptiveScalesEnabled, temporalScaleDomain, maxTopFlowsDisplayNum, and flowEndpointsInViewportMode. Snake-case aliases such as color_scheme, temporal_scale_domain, and max_top_flows_display_num are accepted and normalized internally. Filter state (selectedTimeRange, selectedLocations, and locationFilterMode) must be updated with set_flowmap_filter().

value

The setting value.

Value

The modified map object.

Details

colorScheme accepts the same values as flow_color_scheme in add_flowmap(): a FlowMapGL preset name, a character vector of at least two CSS colors, or a mapgl_continuous_scale object from interpolate_palette(). opacity must be between 0 and 1. fadeAmount must be between 0 and 100. maxTopFlowsDisplayNum must be positive. clusteringLevel must be numeric or NULL. flowLinesRenderingMode must be "straight", "animated-straight", or "curved". temporalScaleDomain must be "selected" or "all". flowEndpointsInViewportMode must be "any" or "both". Boolean settings must be scalar TRUE or FALSE.