I'm trying to publish a map on Shiny, but keep running into this issue.
Let's call the data.frame region
. Here are the columns:
library(mapedit)
library(mapview)
library(shiny)
library(leaflet)
library(leaflet.extras)
region$address
region$city
region$state
region$zip
region$county
region$xcol (these are the longitude coordinates)
region$ycol (these are the latitude coordinates)
But when I run the mapview(region)@map
it produces the following error:
Error: oops! Arguments xcol and/or ycol are missing! You probably expected turf_clean to be a spatial object. However it is of class data.frame. Either convert turf_clean to a spatial object or provide xcol and ycol.
I provided the x and y cols, but it's still not producing what I need.