R/add_geojson.R
gp_add_geojson.Rd
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.
Add a component with ability to fetch geojson from an endpoint to /components
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 )
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 |