TADA_addPoints: Add points from an ArcGIS feature layer to a leaflet map

View source: R/Utilities.R

TADA_addPointsR Documentation

Add points from an ArcGIS feature layer to a leaflet map

Description

Add points from an ArcGIS feature layer to a leaflet map

Usage

TADA_addPoints(map, layerfilepath, layergroup, layername, bbox = NULL)

Arguments

map

A leaflet map

layerfilepath

Local path to the .shp file for the layer

layergroup

Name of the layer group

layername

Name of the layer

bbox

A bounding box from the sf function st_bbox; used to filter the query results. Optional; defaults to NULL.

Value

The original map with polygon from the feature layer added to it.

Examples

## Not run: 
# Create a leaflet map
lmap <- leaflet::leaflet() %>%
  leaflet::addProviderTiles("Esri.WorldTopoMap", group = "World topo") %>%
  leaflet::addMapPane("featurelayers", zIndex = 300)
# Add the Virginia Federally Recognized Tribes feature layer to the map
lmap <- TADA_addPoints(
  lmap, "extdata/VATribe.shp",
  "Tribes", "Virginia Federally Recognized Tribes"
)
lmap

## End(Not run)

USEPA/TADA documentation built on April 12, 2025, 1:47 p.m.