API
Types
AbstractLayer
AbstractLayerAbstract supertype for all deck.gl layers.
AbstractWidget
AbstractWidgetAbstract 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 sourceget_source_position: Column accessor for source [longitude, latitude]. Can be aSymbolorVector{Symbol}like[:src_lng, :src_lat]get_target_position: Column accessor for target [longitude, latitude]. Can be aSymbolorVector{Symbol}like[:dst_lng, :dst_lat]
Optional Arguments
id::String: Unique layer identifierget_source_color: Source end color as[R,G,B,A]or column referenceget_target_color: Target end color as[R,G,B,A]or column referenceget_width::Union{Real,Symbol}: Arc width in pixels. Default:1get_height::Union{Real,Symbol}: Arc height multiplier (0-1). Default:1get_tilt::Union{Real,Symbol}: Arc tilt in degrees. Default:0great_circle::Bool: Use great circle arcs. Default:falsewidth_units::String: Width units (“pixels” or “meters”). Default:"pixels"width_scale::Real: Width multiplier. Default:1width_min_pixels::Real: Minimum width. Default:0width_max_pixels::Real: Maximum width. Default:Infopacity::Real: Layer opacity (0-1). Default:1pickable::Bool: Enable interactions. Default:falsevisible::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 singleAbstractLayeror a vector of layers
Keyword Arguments
initial_view_state::ViewState: Camera configurationmap_style::Union{String,Nothing}: Map tile style URL (Mapbox/MapLibre/Carto)controller::Bool: Enable pan/zoom/rotate controlswidgets::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 identifierfilled::Bool: Fill polygons. Default:truestroked::Bool: Draw polygon outlines. Default:trueextruded::Bool: Extrude polygons in 3D. Default:falsewireframe::Bool: Draw 3D wireframe. Default:falsepoint_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:1get_point_radius::Union{Real,Symbol}: Point radius. Default:1get_elevation::Union{Real,Symbol}: Polygon elevation for 3D. Default:1000line_width_units::String: Line width units. Default:"meters"line_width_scale::Real: Line width multiplier. Default:1line_width_min_pixels::Real: Minimum line width. Default:0line_width_max_pixels::Real: Maximum line width. Default:Infline_joint_rounded::Bool: Round line joints. Default:falseline_cap_rounded::Bool: Round line caps. Default:falseline_miter_limit::Real: Miter limit. Default:4point_radius_units::String: Point radius units. Default:"meters"point_radius_scale::Real: Point radius multiplier. Default:1point_radius_min_pixels::Real: Minimum point radius. Default:0point_radius_max_pixels::Real: Maximum point radius. Default:Infelevation_scale::Real: Elevation multiplier. Default:1opacity::Real: Layer opacity (0-1). Default:1pickable::Bool: Enable interactions. Default:falsevisible::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 sourceget_position: Column accessor for [longitude, latitude]
Optional Arguments
id::String: Unique layer identifiercell_size::Real: Grid cell size in meters. Default:1000elevation_scale::Real: Elevation multiplier for 3D effect. Default:1elevation_range::Vector{<:Real}: Min/max elevation[min, max]. Default:[0, 1000]extruded::Bool: Render as 3D columns. Default:truecoverage::Real: Cell coverage (0-1). Default:1get_color_weight::Union{Real,Symbol}: Weight for color aggregation. Default:1get_elevation_weight::Union{Real,Symbol}: Weight for elevation aggregation. Default:1color_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 scaleupper_percentile::Real: Filter out cells above this percentile. Default:100lower_percentile::Real: Filter out cells below this percentile. Default:0opacity::Real: Layer opacity (0-1). Default:1pickable::Bool: Enable interactions. Default:falsevisible::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 sourceget_position: Column accessor for [longitude, latitude]
Optional Arguments
id::String: Unique layer identifierradius_pixels::Real: Radius of influence in pixels. Default:30intensity::Real: Intensity multiplier. Default:1threshold::Real: Minimum density threshold (0-1). Default:0.05get_weight::Union{Real,Symbol}: Point weight for aggregation. Default:1color_range::Vector: Array of RGBA colors for heatmap gradient. Default: blue-green-yellow-redaggregation::String: Aggregation method (“SUM” or “MEAN”). Default:"SUM"weights_texture_size::Int: Resolution of weight texture. Default:2048debounce_timeout::Int: Debounce timeout in ms. Default:500opacity::Real: Layer opacity (0-1). Default:1pickable::Bool: Enable interactions. Default:falsevisible::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 sourceget_position: Column accessor for [longitude, latitude]
Optional Arguments
id::String: Unique layer identifierradius::Real: Hexagon radius in meters. Default:1000elevation_scale::Real: Elevation multiplier for 3D effect. Default:1elevation_range::Vector{<:Real}: Min/max elevation[min, max]. Default:[0, 1000]extruded::Bool: Render as 3D hexagons. Default:truecoverage::Real: Hexagon coverage (0-1). Default:1get_color_weight::Union{Real,Symbol}: Weight for color aggregation. Default:1get_elevation_weight::Union{Real,Symbol}: Weight for elevation aggregation. Default:1color_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 scaleupper_percentile::Real: Filter out bins above this percentile. Default:100lower_percentile::Real: Filter out bins below this percentile. Default:0opacity::Real: Layer opacity (0-1). Default:1pickable::Bool: Enable interactions. Default:falsevisible::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 sourceget_source_position: Column accessor for source [longitude, latitude]get_target_position: Column accessor for target [longitude, latitude]
Optional Arguments
id::String: Unique layer identifierget_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:1width_units::String: Width units (“pixels” or “meters”). Default:"pixels"width_scale::Real: Width multiplier. Default:1width_min_pixels::Real: Minimum width. Default:0width_max_pixels::Real: Maximum width. Default:Infopacity::Real: Layer opacity (0-1). Default:1pickable::Bool: Enable interactions. Default:falsevisible::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 sourceget_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 identifierget_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:1width_units::String: Width units (“pixels” or “meters”). Default:"pixels"width_scale::Real: Width multiplier. Default:1width_min_pixels::Real: Minimum width. Default:0width_max_pixels::Real: Maximum width. Default:Infcap_rounded::Bool: Round line caps. Default:falsejoint_rounded::Bool: Round line joints. Default:falsebillboard::Bool: Always face camera. Default:falsemiter_limit::Real: Miter limit for sharp corners. Default:4opacity::Real: Layer opacity (0-1). Default:1pickable::Bool: Enable interactions. Default:falsevisible::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 sourceget_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 identifierfilled::Bool: Draw fill. Default:truestroked::Bool: Draw outline. Default:trueextruded::Bool: Extrude polygons in 3D. Default:falsewireframe::Bool: Draw 3D wireframe. Default:falseelevation_scale::Real: Elevation multiplier. Default:1get_elevation::Union{Real,Symbol}: Polygon height for extrusion. Default:1000get_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:1line_width_units::String: Width units. Default:"meters"line_width_scale::Real: Width multiplier. Default:1line_width_min_pixels::Real: Minimum width. Default:0line_width_max_pixels::Real: Maximum width. Default:Infline_joint_rounded::Bool: Round line joints. Default:falseline_miter_limit::Real: Miter limit. Default:4opacity::Real: Layer opacity (0-1). Default:1pickable::Bool: Enable interactions. Default:falsevisible::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 aSymbolfor a column containing coordinate tuples/arrays, or aVector{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:1get_fill_color: Fill color as[R,G,B]or[R,G,B,A](0-255), or aSymbolfor data-driven colorget_line_color: Outline color (same format as fill_color)get_line_width::Union{Real,Symbol}: Outline width in pixels. Default:1radius_scale::Real: Global radius multiplier. Default:1radius_min_pixels::Real: Minimum radius in pixels. Default:0radius_max_pixels::Real: Maximum radius in pixels. Default:Infline_width_units::String: Units for line width (“pixels” or “meters”). Default:"pixels"line_width_scale::Real: Global line width multiplier. Default:1stroked::Bool: Draw outline. Default:falsefilled::Bool: Draw fill. Default:truebillboard::Bool: If true, circles always face camera. Default:falseopacity::Real: Layer opacity (0-1). Default:1pickable::Bool: Enable hover/click interactions. Default:falsevisible::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 sourceget_position: Column accessor for [longitude, latitude]get_text: Column accessor for text content (Symbol referencing a string column)
Optional Arguments
id::String: Unique layer identifierget_size::Union{Real,Symbol}: Text size in pixels. Default:32get_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:0get_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:falseget_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:1billboard::Bool: Always face camera. Default:truesize_scale::Real: Size multiplier. Default:1size_units::String: Size units (“pixels” or “meters”). Default:"pixels"size_min_pixels::Real: Minimum size. Default:0size_max_pixels::Real: Maximum size. Default:Infopacity::Real: Layer opacity (0-1). Default:1pickable::Bool: Enable interactions. Default:falsevisible::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 longitudelatitude::Float64: Center latitudezoom::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 sourcesource: Source position as[lng_col, lat_col]or single column Symboltarget: Target position as[lng_col, lat_col]or single column Symbol
Keyword Arguments
width: Arc width (number or column Symbol). Default:1source_color: Source end color. Default:[0, 128, 255]target_color: Target end color. Default:[255, 0, 128]opacity: Layer opacity (0-1). Default:1zoom: Initial zoom level. Default:3kwargs...: Additional keyword arguments passed toArcLayer
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:1point_radius: Point radius. Default:1opacity: Layer opacity (0-1). Default:1zoom: Initial zoom level. Default:4kwargs...: Additional keyword arguments passed toGeoJsonLayer
geojson_layer
geojson_layer(geom; kwargs...) -> GeoJsonLayerCreate 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 sourcelng: Column name for longitudelat: Column name for latitude
Keyword Arguments
radius: Radius of influence in pixels. Default:30intensity: Intensity multiplier. Default:1weight: Column for point weighting or constant. Default:1threshold: Minimum density threshold. Default:0.05opacity: Layer opacity (0-1). Default:1zoom: Initial zoom level. Default:10kwargs...: Additional keyword arguments passed toHeatmapLayer
hexbin
hexbin(data, lng, lat; radius=1000, elevation_weight=1, kwargs...)Create a hexagonal binning visualization.
Arguments
data: Tables.jl-compatible data sourcelng: Column name for longitudelat: Column name for latitude
Keyword Arguments
radius: Hexagon radius in meters. Default:1000elevation_weight: Column for elevation weighting or constant. Default:1color_weight: Column for color weighting or constant. Default:1elevation_scale: Elevation multiplier. Default:1extruded: Render as 3D hexagons. Default:trueopacity: Layer opacity (0-1). Default:1zoom: Initial zoom level. Default:10kwargs...: Additional keyword arguments passed toHexagonLayer
lines
lines(data, source, target; width=1, color=[0, 0, 0], kwargs...)Create a line visualization connecting points.
Arguments
data: Tables.jl-compatible data sourcesource: Source position as[lng_col, lat_col]target: Target position as[lng_col, lat_col]
Keyword Arguments
width: Line width. Default:1color: Line color. Default:[0, 0, 0]opacity: Layer opacity (0-1). Default:1zoom: Initial zoom level. Default:10kwargs...: Additional keyword arguments passed toLineLayer
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 sourcepath_col: Column containing path coordinates (arrays of [lng, lat] pairs)
Keyword Arguments
width: Path width. Default:1color: Path color. Default:[0, 0, 0]opacity: Layer opacity (0-1). Default:1zoom: Initial zoom level. Default:10rounded: Round line caps and joints. Default:falsekwargs...: Additional keyword arguments passed toPathLayer
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 sourcepolygon_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:1opacity: Layer opacity (0-1). Default:1zoom: Initial zoom level. Default:10kwargs...: Additional keyword arguments passed toPolygonLayer
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 sourcelng: Column name for longitude (Symbol)lat: Column name for latitude (Symbol)
Keyword Arguments
radius: Point radius (number or column Symbol). Default:1color: Point color as[R,G,B]or[R,G,B,A]. Default:[255, 140, 0]opacity: Layer opacity (0-1). Default:1zoom: Initial zoom level. Default:10kwargs...: Additional keyword arguments passed toScatterplotLayer
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 sourcelng: Column name for longitudelat: Column name for latitudetext_col: Column containing text labels
Keyword Arguments
size: Text size. Default:16color: Text color. Default:[0, 0, 0]opacity: Layer opacity (0-1). Default:1zoom: Initial zoom level. Default:10kwargs...: Additional keyword arguments passed toTextLayer
to_geojson
to_geojson(geom) -> DictConvert a GeoInterface-compatible geometry to a GeoJSON Dict.
to_html
to_html(deck::Deck; width="100%", height="500px") -> StringGenerate a standalone HTML string for the deck.gl visualization.
to_json
to_json(deck::Deck) -> StringConvert a Deck to its deck.gl JSON specification string.