API

Types

AbstractLayer

AbstractLayer

Abstract supertype for all deck.gl layers.

AbstractWidget

AbstractWidget

Abstract supertype for all deck.gl widgets.

ArcLayer

ArcLayer(; data, get_source_position, get_target_position, kwargs...)

Renders arcs between source and target coordinates.

Required Arguments

  • data: Any Tables.jl-compatible data source
  • get_source_position: Column accessor for source [longitude, latitude]. Can be a Symbol or Vector{Symbol} like [:src_lng, :src_lat]
  • get_target_position: Column accessor for target [longitude, latitude]. Can be a Symbol or Vector{Symbol} like [:dst_lng, :dst_lat]

Optional Arguments

  • id::String: Unique layer identifier
  • get_source_color: Source end color as [R,G,B,A] or column reference
  • get_target_color: Target end color as [R,G,B,A] or column reference
  • get_width::Union{Real,Symbol}: Arc width in pixels. Default: 1
  • get_height::Union{Real,Symbol}: Arc height multiplier (0-1). Default: 1
  • get_tilt::Union{Real,Symbol}: Arc tilt in degrees. Default: 0
  • great_circle::Bool: Use great circle arcs. Default: false
  • width_units::String: Width units (“pixels” or “meters”). Default: "pixels"
  • width_scale::Real: Width multiplier. Default: 1
  • width_min_pixels::Real: Minimum width. Default: 0
  • width_max_pixels::Real: Maximum width. Default: Inf
  • opacity::Real: Layer opacity (0-1). Default: 1
  • pickable::Bool: Enable interactions. Default: false
  • visible::Bool: Layer visibility. Default: true

Example

trips = (
    src_lng = [-122.4, -122.5],
    src_lat = [37.8, 37.7],
    dst_lng = [-73.9, -87.6],
    dst_lat = [40.7, 41.9],
    count = [100, 50]
)

layer = ArcLayer(
    data = trips,
    get_source_position = [:src_lng, :src_lat],
    get_target_position = [:dst_lng, :dst_lat],
    get_width = :count,
    get_source_color = [0, 128, 255],
    get_target_color = [255, 0, 128]
)

CompassWidget

CompassWidget(; id="compass", placement="top-right", transition_duration=200)

Displays a compass rose showing the current bearing. Click to reset bearing to north.

Keyword Arguments

  • id::String: Widget identifier. Default: "compass"
  • placement::String: Widget position ("top-left", "top-right", "bottom-left", "bottom-right"). Default: "top-right"
  • transition_duration::Int: Reset animation duration in ms. Default: 200

Examples

Deck(layer, widgets=[CompassWidget()])
Deck(layer, widgets=[CompassWidget(placement="bottom-right")])

Deck

Deck(layers; initial_view_state=ViewState(), map_style=nothing, controller=true, widgets=AbstractWidget[])

The top-level container representing a deck.gl visualization.

Arguments

  • layers: A single AbstractLayer or a vector of layers

Keyword Arguments

  • initial_view_state::ViewState: Camera configuration
  • map_style::Union{String,Nothing}: Map tile style URL (Mapbox/MapLibre/Carto)
  • controller::Bool: Enable pan/zoom/rotate controls
  • widgets::Vector{AbstractWidget}: UI widgets (zoom, compass, fullscreen)

Example

layer = ScatterplotLayer(data=df, get_position=[:lng, :lat])
deck = Deck(layer,
    initial_view_state=ViewState(longitude=-122.4, latitude=37.8, zoom=11),
    widgets=[ZoomWidget(), CompassWidget()]
)

FullscreenWidget

FullscreenWidget(; id="fullscreen", placement="top-right")

Adds a button to toggle fullscreen mode.

Keyword Arguments

  • id::String: Widget identifier. Default: "fullscreen"
  • placement::String: Widget position ("top-left", "top-right", "bottom-left", "bottom-right"). Default: "top-right"

Examples

Deck(layer, widgets=[FullscreenWidget()])
Deck(layer, widgets=[FullscreenWidget(placement="top-left")])

GeoJsonLayer

GeoJsonLayer(; data, kwargs...)

Renders GeoJSON data as points, lines, and polygons.

This is a composite layer that automatically renders GeoJSON features using the appropriate sub-layers (ScatterplotLayer, PathLayer, PolygonLayer).

Required Arguments

  • data: GeoJSON data as a Dict, String (JSON), or URL to GeoJSON file

Optional Arguments

  • id::String: Unique layer identifier
  • filled::Bool: Fill polygons. Default: true
  • stroked::Bool: Draw polygon outlines. Default: true
  • extruded::Bool: Extrude polygons in 3D. Default: false
  • wireframe::Bool: Draw 3D wireframe. Default: false
  • point_type::String: Point rendering type (“circle”, “icon”, “text”). Default: "circle"
  • get_fill_color: Fill color. Default: [0, 0, 0, 255]
  • get_line_color: Line/stroke color. Default: [0, 0, 0, 255]
  • get_line_width::Union{Real,Symbol}: Line width. Default: 1
  • get_point_radius::Union{Real,Symbol}: Point radius. Default: 1
  • get_elevation::Union{Real,Symbol}: Polygon elevation for 3D. Default: 1000
  • line_width_units::String: Line width units. Default: "meters"
  • line_width_scale::Real: Line width multiplier. Default: 1
  • line_width_min_pixels::Real: Minimum line width. Default: 0
  • line_width_max_pixels::Real: Maximum line width. Default: Inf
  • line_joint_rounded::Bool: Round line joints. Default: false
  • line_cap_rounded::Bool: Round line caps. Default: false
  • line_miter_limit::Real: Miter limit. Default: 4
  • point_radius_units::String: Point radius units. Default: "meters"
  • point_radius_scale::Real: Point radius multiplier. Default: 1
  • point_radius_min_pixels::Real: Minimum point radius. Default: 0
  • point_radius_max_pixels::Real: Maximum point radius. Default: Inf
  • elevation_scale::Real: Elevation multiplier. Default: 1
  • opacity::Real: Layer opacity (0-1). Default: 1
  • pickable::Bool: Enable interactions. Default: false
  • visible::Bool: Layer visibility. Default: true

Example

# GeoJSON as a Dict
geojson = Dict(
    "type" => "FeatureCollection",
    "features" => [
        Dict(
            "type" => "Feature",
            "geometry" => Dict(
                "type" => "Point",
                "coordinates" => [-122.4, 37.8]
            ),
            "properties" => Dict("name" => "San Francisco")
        )
    ]
)

layer = GeoJsonLayer(
    data = geojson,
    get_fill_color = [255, 0, 0, 100],
    get_line_color = [255, 0, 0, 255],
    get_point_radius = 100
)

# Or load from URL
layer = GeoJsonLayer(
    data = "https://example.com/data.geojson",
    filled = true,
    stroked = true
)

GridLayer

GridLayer(; data, get_position, kwargs...)

Aggregates data into rectangular grid cells and renders as 3D columns.

Required Arguments

  • data: Any Tables.jl-compatible data source
  • get_position: Column accessor for [longitude, latitude]

Optional Arguments

  • id::String: Unique layer identifier
  • cell_size::Real: Grid cell size in meters. Default: 1000
  • elevation_scale::Real: Elevation multiplier for 3D effect. Default: 1
  • elevation_range::Vector{<:Real}: Min/max elevation [min, max]. Default: [0, 1000]
  • extruded::Bool: Render as 3D columns. Default: true
  • coverage::Real: Cell coverage (0-1). Default: 1
  • get_color_weight::Union{Real,Symbol}: Weight for color aggregation. Default: 1
  • get_elevation_weight::Union{Real,Symbol}: Weight for elevation aggregation. Default: 1
  • color_aggregation::String: Aggregation method (“SUM”, “MEAN”, “MIN”, “MAX”). Default: "SUM"
  • elevation_aggregation::String: Aggregation method. Default: "SUM"
  • color_range::Vector: Array of RGB colors for color scale. Default: 6-color yellow-red scale
  • upper_percentile::Real: Filter out cells above this percentile. Default: 100
  • lower_percentile::Real: Filter out cells below this percentile. Default: 0
  • opacity::Real: Layer opacity (0-1). Default: 1
  • pickable::Bool: Enable interactions. Default: false
  • visible::Bool: Layer visibility. Default: true

Example

points = (
    lng = rand(-122.5:-122.3, 5000),
    lat = rand(37.7:37.9, 5000),
    value = rand(5000)
)

layer = GridLayer(
    data = points,
    get_position = [:lng, :lat],
    get_elevation_weight = :value,
    cell_size = 200,
    elevation_scale = 4,
    extruded = true
)

HeatmapLayer

HeatmapLayer(; data, get_position, kwargs...)

Renders a heatmap based on point density and weights.

Required Arguments

  • data: Any Tables.jl-compatible data source
  • get_position: Column accessor for [longitude, latitude]

Optional Arguments

  • id::String: Unique layer identifier
  • radius_pixels::Real: Radius of influence in pixels. Default: 30
  • intensity::Real: Intensity multiplier. Default: 1
  • threshold::Real: Minimum density threshold (0-1). Default: 0.05
  • get_weight::Union{Real,Symbol}: Point weight for aggregation. Default: 1
  • color_range::Vector: Array of RGBA colors for heatmap gradient. Default: blue-green-yellow-red
  • aggregation::String: Aggregation method (“SUM” or “MEAN”). Default: "SUM"
  • weights_texture_size::Int: Resolution of weight texture. Default: 2048
  • debounce_timeout::Int: Debounce timeout in ms. Default: 500
  • opacity::Real: Layer opacity (0-1). Default: 1
  • pickable::Bool: Enable interactions. Default: false
  • visible::Bool: Layer visibility. Default: true

Example

incidents = (
    lng = rand(-122.5:-122.3, 10000),
    lat = rand(37.7:37.9, 10000),
    severity = rand(1:5, 10000)
)

layer = HeatmapLayer(
    data = incidents,
    get_position = [:lng, :lat],
    get_weight = :severity,
    radius_pixels = 50,
    intensity = 1,
    threshold = 0.03
)

HexagonLayer

HexagonLayer(; data, get_position, kwargs...)

Aggregates data into hexagonal bins and renders as 3D hexagons.

Required Arguments

  • data: Any Tables.jl-compatible data source
  • get_position: Column accessor for [longitude, latitude]

Optional Arguments

  • id::String: Unique layer identifier
  • radius::Real: Hexagon radius in meters. Default: 1000
  • elevation_scale::Real: Elevation multiplier for 3D effect. Default: 1
  • elevation_range::Vector{<:Real}: Min/max elevation [min, max]. Default: [0, 1000]
  • extruded::Bool: Render as 3D hexagons. Default: true
  • coverage::Real: Hexagon coverage (0-1). Default: 1
  • get_color_weight::Union{Real,Symbol}: Weight for color aggregation. Default: 1
  • get_elevation_weight::Union{Real,Symbol}: Weight for elevation aggregation. Default: 1
  • color_aggregation::String: Aggregation method (“SUM”, “MEAN”, “MIN”, “MAX”). Default: "SUM"
  • elevation_aggregation::String: Aggregation method. Default: "SUM"
  • color_range::Vector: Array of RGB colors for color scale. Default: 6-color yellow-red scale
  • upper_percentile::Real: Filter out bins above this percentile. Default: 100
  • lower_percentile::Real: Filter out bins below this percentile. Default: 0
  • opacity::Real: Layer opacity (0-1). Default: 1
  • pickable::Bool: Enable interactions. Default: false
  • visible::Bool: Layer visibility. Default: true

Example

earthquakes = (
    lng = rand(-180.0:0.01:180.0, 10000),
    lat = rand(-60.0:0.01:60.0, 10000),
    magnitude = rand(1.0:0.1:8.0, 10000)
)

layer = HexagonLayer(
    data = earthquakes,
    get_position = [:lng, :lat],
    get_elevation_weight = :magnitude,
    radius = 50000,
    elevation_scale = 100,
    extruded = true
)

LineLayer

LineLayer(; data, get_source_position, get_target_position, kwargs...)

Renders straight lines between source and target coordinates.

Required Arguments

  • data: Any Tables.jl-compatible data source
  • get_source_position: Column accessor for source [longitude, latitude]
  • get_target_position: Column accessor for target [longitude, latitude]

Optional Arguments

  • id::String: Unique layer identifier
  • get_color: Line color as [R,G,B,A] or column reference. Default: [0,0,0,255]
  • get_width::Union{Real,Symbol}: Line width in pixels. Default: 1
  • width_units::String: Width units (“pixels” or “meters”). Default: "pixels"
  • width_scale::Real: Width multiplier. Default: 1
  • width_min_pixels::Real: Minimum width. Default: 0
  • width_max_pixels::Real: Maximum width. Default: Inf
  • opacity::Real: Layer opacity (0-1). Default: 1
  • pickable::Bool: Enable interactions. Default: false
  • visible::Bool: Layer visibility. Default: true

Example

connections = (
    from_lng = [-122.4, -122.5],
    from_lat = [37.8, 37.7],
    to_lng = [-122.3, -122.4],
    to_lat = [37.9, 37.8]
)

layer = LineLayer(
    data = connections,
    get_source_position = [:from_lng, :from_lat],
    get_target_position = [:to_lng, :to_lat],
    get_color = [255, 0, 0, 200],
    get_width = 2
)

PathLayer

PathLayer(; data, get_path, kwargs...)

Renders sequences of coordinates as paths/polylines.

Required Arguments

  • data: Any Tables.jl-compatible data source
  • get_path: Column accessor for path coordinates. Should reference a column containing arrays of [lng, lat] pairs, e.g., [[lng1,lat1], [lng2,lat2], ...]

Optional Arguments

  • id::String: Unique layer identifier
  • get_color: Path color as [R,G,B,A] or column reference. Default: [0,0,0,255]
  • get_width::Union{Real,Symbol}: Path width in pixels. Default: 1
  • width_units::String: Width units (“pixels” or “meters”). Default: "pixels"
  • width_scale::Real: Width multiplier. Default: 1
  • width_min_pixels::Real: Minimum width. Default: 0
  • width_max_pixels::Real: Maximum width. Default: Inf
  • cap_rounded::Bool: Round line caps. Default: false
  • joint_rounded::Bool: Round line joints. Default: false
  • billboard::Bool: Always face camera. Default: false
  • miter_limit::Real: Miter limit for sharp corners. Default: 4
  • opacity::Real: Layer opacity (0-1). Default: 1
  • pickable::Bool: Enable interactions. Default: false
  • visible::Bool: Layer visibility. Default: true

Example

routes = (
    path = [
        [[-122.4, 37.8], [-122.5, 37.7], [-122.3, 37.9]],
        [[-122.45, 37.75], [-122.35, 37.85]]
    ],
    name = ["Route A", "Route B"]
)

layer = PathLayer(
    data = routes,
    get_path = :path,
    get_color = [0, 128, 255, 200],
    get_width = 5,
    cap_rounded = true
)

PolygonLayer

PolygonLayer(; data, get_polygon, kwargs...)

Renders filled and/or stroked polygons.

Required Arguments

  • data: Any Tables.jl-compatible data source
  • get_polygon: Column accessor for polygon coordinates. Should reference a column containing arrays of [lng, lat] rings (outer ring, then optional holes)

Optional Arguments

  • id::String: Unique layer identifier
  • filled::Bool: Draw fill. Default: true
  • stroked::Bool: Draw outline. Default: true
  • extruded::Bool: Extrude polygons in 3D. Default: false
  • wireframe::Bool: Draw 3D wireframe. Default: false
  • elevation_scale::Real: Elevation multiplier. Default: 1
  • get_elevation::Union{Real,Symbol}: Polygon height for extrusion. Default: 1000
  • get_fill_color: Fill color as [R,G,B,A] or column reference. Default: [0,0,0,255]
  • get_line_color: Outline color as [R,G,B,A] or column reference. Default: [0,0,0,255]
  • get_line_width::Union{Real,Symbol}: Outline width. Default: 1
  • line_width_units::String: Width units. Default: "meters"
  • line_width_scale::Real: Width multiplier. Default: 1
  • line_width_min_pixels::Real: Minimum width. Default: 0
  • line_width_max_pixels::Real: Maximum width. Default: Inf
  • line_joint_rounded::Bool: Round line joints. Default: false
  • line_miter_limit::Real: Miter limit. Default: 4
  • opacity::Real: Layer opacity (0-1). Default: 1
  • pickable::Bool: Enable interactions. Default: false
  • visible::Bool: Layer visibility. Default: true

Example

regions = (
    polygon = [
        [[[-122.4, 37.8], [-122.5, 37.7], [-122.3, 37.7], [-122.4, 37.8]]],
        [[[-122.45, 37.85], [-122.5, 37.8], [-122.4, 37.8], [-122.45, 37.85]]]
    ],
    value = [100, 200]
)

layer = PolygonLayer(
    data = regions,
    get_polygon = :polygon,
    get_fill_color = [255, 140, 0, 100],
    get_line_color = [255, 140, 0, 255],
    get_line_width = 2
)

ScatterplotLayer

ScatterplotLayer(; data, get_position, kwargs...)

Renders circles at given coordinates.

Required Arguments

  • data: Any Tables.jl-compatible data source (DataFrame, NamedTuple of vectors, etc.)
  • get_position: Column accessor for [longitude, latitude] positions. Can be a Symbol for a column containing coordinate tuples/arrays, or a Vector{Symbol} like [:lng, :lat] for separate columns.

Optional Arguments

  • id::String: Unique layer identifier (auto-generated if not provided)
  • get_radius::Union{Real,Symbol}: Circle radius in meters. Default: 1
  • get_fill_color: Fill color as [R,G,B] or [R,G,B,A] (0-255), or a Symbol for data-driven color
  • get_line_color: Outline color (same format as fill_color)
  • get_line_width::Union{Real,Symbol}: Outline width in pixels. Default: 1
  • radius_scale::Real: Global radius multiplier. Default: 1
  • radius_min_pixels::Real: Minimum radius in pixels. Default: 0
  • radius_max_pixels::Real: Maximum radius in pixels. Default: Inf
  • line_width_units::String: Units for line width (“pixels” or “meters”). Default: "pixels"
  • line_width_scale::Real: Global line width multiplier. Default: 1
  • stroked::Bool: Draw outline. Default: false
  • filled::Bool: Draw fill. Default: true
  • billboard::Bool: If true, circles always face camera. Default: false
  • opacity::Real: Layer opacity (0-1). Default: 1
  • pickable::Bool: Enable hover/click interactions. Default: false
  • visible::Bool: Layer visibility. Default: true

Example

using DataFrames

df = DataFrame(
    longitude = [-122.4, -122.5, -122.3],
    latitude = [37.8, 37.7, 37.9],
    size = [100, 200, 150]
)

layer = ScatterplotLayer(
    data = df,
    get_position = [:longitude, :latitude],
    get_radius = :size,
    get_fill_color = [255, 140, 0, 200]
)

TextLayer

TextLayer(; data, get_position, get_text, kwargs...)

Renders text labels at given coordinates.

Required Arguments

  • data: Any Tables.jl-compatible data source
  • get_position: Column accessor for [longitude, latitude]
  • get_text: Column accessor for text content (Symbol referencing a string column)

Optional Arguments

  • id::String: Unique layer identifier
  • get_size::Union{Real,Symbol}: Text size in pixels. Default: 32
  • get_color: Text color as [R,G,B,A] or column reference. Default: [0,0,0,255]
  • get_angle::Union{Real,Symbol}: Text rotation in degrees. Default: 0
  • get_text_anchor::String: Horizontal anchor (“start”, “middle”, “end”). Default: "middle"
  • get_alignment_baseline::String: Vertical anchor (“top”, “center”, “bottom”). Default: "center"
  • get_pixel_offset::Vector{<:Real}: Pixel offset [x, y]. Default: [0, 0]
  • background::Bool: Draw background. Default: false
  • get_background_color: Background color. Default: [255, 255, 255, 255]
  • background_padding::Vector{<:Real}: Background padding [x, y]. Default: [0, 0]
  • font_family::String: Font family. Default: "Monaco, monospace"
  • font_weight::Union{String,Int}: Font weight. Default: "normal"
  • line_height::Real: Line height multiplier. Default: 1
  • billboard::Bool: Always face camera. Default: true
  • size_scale::Real: Size multiplier. Default: 1
  • size_units::String: Size units (“pixels” or “meters”). Default: "pixels"
  • size_min_pixels::Real: Minimum size. Default: 0
  • size_max_pixels::Real: Maximum size. Default: Inf
  • opacity::Real: Layer opacity (0-1). Default: 1
  • pickable::Bool: Enable interactions. Default: false
  • visible::Bool: Layer visibility. Default: true

Example

cities = (
    lng = [-122.4, -73.9, -87.6],
    lat = [37.8, 40.7, 41.9],
    name = ["San Francisco", "New York", "Chicago"],
    population = [883000, 8336000, 2693000]
)

layer = TextLayer(
    data = cities,
    get_position = [:lng, :lat],
    get_text = :name,
    get_size = 16,
    get_color = [0, 0, 0, 255],
    get_text_anchor = "middle",
    get_alignment_baseline = "center"
)

ViewState

ViewState(; longitude=0.0, latitude=0.0, zoom=1.0, pitch=0.0, bearing=0.0)

Camera/viewport configuration for a deck.gl visualization.

Fields

  • longitude::Float64: Center longitude
  • latitude::Float64: Center latitude
  • zoom::Float64: Zoom level (0-20+)
  • pitch::Float64: Tilt angle in degrees (0-60)
  • bearing::Float64: Rotation angle in degrees (0-360)

ZoomWidget

ZoomWidget(; id="zoom", placement="top-right", orientation="vertical", transition_duration=200)

Adds +/- zoom buttons to the map.

Keyword Arguments

  • id::String: Widget identifier. Default: "zoom"
  • placement::String: Widget position ("top-left", "top-right", "bottom-left", "bottom-right"). Default: "top-right"
  • orientation::String: Button layout ("vertical" or "horizontal"). Default: "vertical"
  • transition_duration::Int: Zoom animation duration in ms. Default: 200

Examples

Deck(layer, widgets=[ZoomWidget()])
Deck(layer, widgets=[ZoomWidget(placement="top-left", orientation="horizontal")])

Functions

arcs

arcs(data, source, target; width=1, source_color=[0, 128, 255], target_color=[255, 0, 128], kwargs...)

Create an arc diagram visualization.

Arguments

  • data: Tables.jl-compatible data source
  • source: Source position as [lng_col, lat_col] or single column Symbol
  • target: Target position as [lng_col, lat_col] or single column Symbol

Keyword Arguments

  • width: Arc width (number or column Symbol). Default: 1
  • source_color: Source end color. Default: [0, 128, 255]
  • target_color: Target end color. Default: [255, 0, 128]
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 3
  • kwargs...: Additional keyword arguments passed to ArcLayer

Example

trips = (src_lng=[-122.4], src_lat=[37.8], dst_lng=[-73.9], dst_lat=[40.7])
arcs(trips, [:src_lng, :src_lat], [:dst_lng, :dst_lat])

geojson

geojson(data; fill_color=[0, 0, 0, 100], line_color=[0, 0, 0], kwargs...)

Create a GeoJSON visualization.

Arguments

  • data: GeoJSON data as Dict, JSON string, or URL

Keyword Arguments

  • fill_color: Fill color for polygons. Default: [0, 0, 0, 100]
  • line_color: Line/stroke color. Default: [0, 0, 0]
  • line_width: Line width. Default: 1
  • point_radius: Point radius. Default: 1
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 4
  • kwargs...: Additional keyword arguments passed to GeoJsonLayer

geojson_layer

geojson_layer(geom; kwargs...) -> GeoJsonLayer

Create a GeoJsonLayer from any GeoInterface-compatible geometry.

Example

using Shapefile

shp = Shapefile.Table("boundaries.shp")
layer = geojson_layer(shp, get_fill_color=[255, 0, 0, 100])

heatmap

heatmap(data, lng, lat; radius=30, intensity=1, weight=1, kwargs...)

Create a heatmap visualization.

Arguments

  • data: Tables.jl-compatible data source
  • lng: Column name for longitude
  • lat: Column name for latitude

Keyword Arguments

  • radius: Radius of influence in pixels. Default: 30
  • intensity: Intensity multiplier. Default: 1
  • weight: Column for point weighting or constant. Default: 1
  • threshold: Minimum density threshold. Default: 0.05
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 10
  • kwargs...: Additional keyword arguments passed to HeatmapLayer

hexbin

hexbin(data, lng, lat; radius=1000, elevation_weight=1, kwargs...)

Create a hexagonal binning visualization.

Arguments

  • data: Tables.jl-compatible data source
  • lng: Column name for longitude
  • lat: Column name for latitude

Keyword Arguments

  • radius: Hexagon radius in meters. Default: 1000
  • elevation_weight: Column for elevation weighting or constant. Default: 1
  • color_weight: Column for color weighting or constant. Default: 1
  • elevation_scale: Elevation multiplier. Default: 1
  • extruded: Render as 3D hexagons. Default: true
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 10
  • kwargs...: Additional keyword arguments passed to HexagonLayer

lines

lines(data, source, target; width=1, color=[0, 0, 0], kwargs...)

Create a line visualization connecting points.

Arguments

  • data: Tables.jl-compatible data source
  • source: Source position as [lng_col, lat_col]
  • target: Target position as [lng_col, lat_col]

Keyword Arguments

  • width: Line width. Default: 1
  • color: Line color. Default: [0, 0, 0]
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 10
  • kwargs...: Additional keyword arguments passed to LineLayer

open_html

open_html(deck::Deck; width="100%", height="500px")

Open the visualization in the default web browser.

paths

paths(data, path_col; width=1, color=[0, 0, 0], kwargs...)

Create a path visualization.

Arguments

  • data: Tables.jl-compatible data source
  • path_col: Column containing path coordinates (arrays of [lng, lat] pairs)

Keyword Arguments

  • width: Path width. Default: 1
  • color: Path color. Default: [0, 0, 0]
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 10
  • rounded: Round line caps and joints. Default: false
  • kwargs...: Additional keyword arguments passed to PathLayer

polygons

polygons(data, polygon_col; fill_color=[0, 0, 0, 100], line_color=[0, 0, 0], kwargs...)

Create a polygon visualization.

Arguments

  • data: Tables.jl-compatible data source
  • polygon_col: Column containing polygon coordinates

Keyword Arguments

  • fill_color: Fill color. Default: [0, 0, 0, 100]
  • line_color: Outline color. Default: [0, 0, 0]
  • line_width: Outline width. Default: 1
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 10
  • kwargs...: Additional keyword arguments passed to PolygonLayer

save_html

save_html(deck::Deck, path::String; width="100%", height="500px")

Save the visualization as a standalone HTML file.

scatter

scatter(data, lng, lat; radius=1, color=[255, 140, 0], opacity=1, zoom=10, kwargs...)

Create a scatterplot visualization.

Arguments

  • data: Tables.jl-compatible data source
  • lng: Column name for longitude (Symbol)
  • lat: Column name for latitude (Symbol)

Keyword Arguments

  • radius: Point radius (number or column Symbol). Default: 1
  • color: Point color as [R,G,B] or [R,G,B,A]. Default: [255, 140, 0]
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 10
  • kwargs...: Additional keyword arguments passed to ScatterplotLayer

Example

data = (lng = [-122.4, -122.5], lat = [37.8, 37.7], size = [100, 200])
scatter(data, :lng, :lat, radius=:size, color=[0, 128, 255])

text

text(data, lng, lat, text_col; size=16, color=[0, 0, 0], kwargs...)

Create a text label visualization.

Arguments

  • data: Tables.jl-compatible data source
  • lng: Column name for longitude
  • lat: Column name for latitude
  • text_col: Column containing text labels

Keyword Arguments

  • size: Text size. Default: 16
  • color: Text color. Default: [0, 0, 0]
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 10
  • kwargs...: Additional keyword arguments passed to TextLayer

to_geojson

to_geojson(geom) -> Dict

Convert a GeoInterface-compatible geometry to a GeoJSON Dict.

to_html

to_html(deck::Deck; width="100%", height="500px") -> String

Generate a standalone HTML string for the deck.gl visualization.

to_json

to_json(deck::Deck) -> String

Convert a Deck to its deck.gl JSON specification string.