map_server {AtlasMaker}R Documentation

The Shiny server module for AtlasMaker.

Description

This is the core ui and server function for AtlasMaker where users pass in the spatial-data based lists and aesthetic choices for each map tab.

Usage

map_server(
  id,
  polygons = NULL,
  polygon_legend_title = NULL,
  points = NULL,
  polylines = NULL,
  center = NULL,
  min_zoom = 7,
  map_base_theme = "Stamen.Terrain",
  poly_palette = "BuPu",
  point_color = "black",
  polyline_color = "gray"
)

Arguments

id

identifier for the map. This must match the id used in map_UI().

polygons

polygon data in geospatial format.

polygon_legend_title

title to display on legend for polygon shading

points

point data with label, lat, and long variables.

polylines

polyline data in geospatial format.

center

lat/long of where to center the default map.

min_zoom

minimum zoom level users can see, default 7.

map_base_theme

Leaflet-compatible theme for base map.

poly_palette

Leaflet-compatible color palette for polygon shading.

point_color

Leaflet-compatible single color for point colors.

polyline_color

Leaflet-compatible single color for polyline colors.

Value

a list of parameters, including spatial data, that are passed into the AtlasMaker module that builds a single map tab.

Examples

server <- function(input, output) {
map_server(id = map2,
            polygons = watersheds,
            polygon_legend_title = "Watershed",
            points = farms,
            polylines = rivers,
            point_color = 'red',
            polyline_color = 'black')
            }





[Package AtlasMaker version 0.1.0 Index]