Opens an interactive map to explore satellite imagery, draw prompts, and run SAM detection.
Usage
sam_explore(
source = c("mapbox", "esri", "maptiler"),
center = NULL,
bbox = NULL,
zoom = 15
)Arguments
- source
Imagery source: "mapbox", "esri", or "maptiler".
"mapbox": Requires
MAPBOX_PUBLIC_TOKENenvironment variable"esri": Free Esri World Imagery (no API key required)
"maptiler": Requires
MAPTILER_API_KEYenvironment variable
- center
Initial map center as c(lng, lat). If NULL, defaults to US center.
- bbox
Initial bounding box as c(xmin, ymin, xmax, ymax) or sf object. If provided, map will zoom to this extent.
- zoom
Initial zoom level (default 15).
Details
The explorer provides a complete workflow:
Navigate the map to find an area of interest
Select a prompt type (text, box, points, or exemplar)
Enter text or draw prompts on the map
Click "Detect" to run SAM on the current viewport
View results and optionally refine with +/- points
Click "Done" to return the geosam object
