getBboxJson | R Documentation |
Get bounding box JSON
getBboxJson(bbox)
bbox |
A bounding box from the sf function st_bbox |
A string containing bounding box JSON that can be passed to an ArcGIS feature layer in the Input Geometry field
## Not run:
# Load example dataset
data(Data_6Tribes_5y)
# Get the bounding box of the data
bbox <- sf::st_bbox(
c(
xmin = min(Data_6Tribes_5y$TADA.LongitudeMeasure),
ymin = min(Data_6Tribes_5y$TADA.LatitudeMeasure),
xmax = max(Data_6Tribes_5y$TADA.LongitudeMeasure),
ymax = max(Data_6Tribes_5y$TADA.LatitudeMeasure)
),
crs = sf::st_crs(Data_6Tribes_5y)
)
# Get a string containing the JSON of the bounding box
getBboxJson(bbox)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.