API Reference

Main Functions

explore

explore(; extent, provider, figure)
explore(geometry; padding=0.1, kw...)

Launch the GeoExplorer application.

Keyword Arguments:

  • extent: Initial map extent (default: Continental US)
  • provider: Tile provider for basemap (default: OpenStreetMap)
  • figure: Makie Figure to use (default: creates new 1200x800 figure)

With Geometry:

  • geometry: Any GeoInterface-compatible geometry
  • padding: Fractional padding around geometry extent (default: 0.1)

Returns: GeoExplorerApp instance

Examples:

# Default view
app = explore()

# Custom extent
app = explore(extent=Extents.Extent(X=(-74.1, -73.9), Y=(40.7, 40.8)))

# With tile provider
app = explore(provider=TileProviders.Esri(:WorldImagery))

# With geometry
geom = GeoJSON.read("data.geojson")
app = explore(geom)

plot_geometry!

plot_geometry!(app::GeoExplorerApp, geometry; kw...)

Plot a GeoInterface-compatible geometry on the map.

Arguments:

  • app: The GeoExplorerApp instance
  • geometry: Any GeoInterface-compatible geometry

Keyword Arguments (vary by geometry type):

Geometry Keywords
Point/MultiPoint color=:red, markersize=10
LineString/MultiLineString color=:blue, linewidth=2
Polygon/MultiPolygon color=(:blue, 0.3), strokecolor=:blue, strokewidth=2

Examples:

app = explore()

# Plot with defaults
plot_geometry!(app, geom)

# Customize appearance
plot_geometry!(app, polygon, color=(:green, 0.5), strokecolor=:darkgreen)
plot_geometry!(app, line, color=:red, linewidth=3)
plot_geometry!(app, points, color=:orange, markersize=15)

Tile Providers

available_providers

available_providers()

Returns a list of available tile providers as name => provider pairs.

Available Providers:

  • OpenStreetMap
  • Esri WorldImagery
  • Esri WorldTopoMap
  • Esri WorldStreetMap
  • CartoDB Positron
  • CartoDB DarkMatter

Example:

providers = available_providers()
app = explore(provider=providers[2].second)  # Esri WorldImagery

set_provider!

set_provider!(app::GeoExplorerApp, provider)

Note: Changing tile provider at runtime is not currently supported by Tyler.jl. Use explore(provider=...) to specify the provider at creation time.


Layer Functions

add_layer!

add_layer!(app::GeoExplorerApp, name::String, plot; visible=true)

Add a plot as a named layer.

Arguments:

  • app: The GeoExplorerApp instance
  • name: Display name for the layer
  • plot: A Makie plot object (from scatter!, lines!, poly!, etc.)
  • visible: Initial visibility (default: true)

Returns: Layer instance

Example:

plt = scatter!(app.map_axis, xs, ys; color=:red)
add_layer!(app, "My Points", plt)

remove_layer!

remove_layer!(app::GeoExplorerApp, layer::Layer)
remove_layer!(app::GeoExplorerApp, name::String)

Remove a layer from the application.


toggle_layer!

toggle_layer!(layer::Layer)
toggle_layer!(app::GeoExplorerApp, name::String)

Toggle the visibility of a layer.


get_layer

get_layer(app::GeoExplorerApp, name::String)

Get a layer by name. Returns nothing if not found.


zoom_to_layer!

zoom_to_layer!(app::GeoExplorerApp, layer::Layer; padding=0.1)
zoom_to_layer!(app::GeoExplorerApp, name::String; padding=0.1)

Zoom the map to fit the extent of a layer.

Arguments:

  • padding: Fractional padding around the layer extent (default: 0.1)

Types

GeoExplorerApp

Main application struct containing:

  • figure::Figure - The GLMakie figure
  • map_axis::Axis - The map axis
  • map::Tyler.Map - The Tyler map object
  • zoom_level::Observable{Int} - Current zoom level
  • provider - Current tile provider
  • extent::Extents.Extent - Original extent
  • cursor_pos::Observable{Tuple{Float64, Float64}} - Cursor position (lon, lat)
  • layers::Vector{Layer} - Registered layers

Layer

A layer that can be plotted on top of the base map.

  • name::String - Display name for the layer
  • plot::Any - Reference to the Makie plot object
  • visible::Observable{Bool} - Whether the layer is currently visible

Coordinate Conversion

GeoExplorer uses Web Mercator (EPSG:3857) internally but accepts WGS84 (EPSG:4326) coordinates for navigation functions.

The cursor position display shows WGS84 coordinates (latitude/longitude in degrees).