Assumes there is a valid geoplumber app at wd TODO: work with valid paths too TODO: either here, or separate function, add my own component.

  1. Add a component with ability to fetch geojson from an endpoint to /components

  2. Import it into the App.js (TODO: into any other component) Errors: stop execution if either React 'src' folder or for now "Welcome.js" component does not exist. This is because for now we are adding the ready to use GeoJSONComponent component into src/Welcome.js

gp_add_geojson(
  endpoint = "/api/data",
  color = "#3388ff",
  line_weight = NA,
  properties = FALSE
)

Arguments

endpoint

where to fetch the geojson from

color

for now color value for all geojson

line_weight

worded carefully for leaflet geojson lineweight.

properties

logical, by default FALSE. If TRUE color and line_weight will be obtained from properties/columns from corresponding data served via endpoint

Examples

if (FALSE) { if(gp_is_wd_geoplumber()) { gp_add_geojson() } }