Creating leaflet maps without using the long lines of javascript code can be achieved by using the Leaflet R package in the Rstudio App. Of course, you cannot run away from a bit of R coding though.
Steps -Install RStudio application to your pc - Launch RStudio - Go to the ‘Packages’ tab and install the following libraries library(raster), library(leaflet) and library(sp)
Write the code lines below in the console and Press Enter. Click on the Viewer Tab to see the resuling map below.
library(leaflet)
leaflet(width = "100%") %>%
addTiles(attribution = "data © mapsnigeriainitiative 2016") %>% # Add default openstreetmap map tiles
setView(lng = 8.0, lat = 9.0, zoom = 6)
Now let us add some markers to the leaflet map. write the code lines below into the console. Click on the Viewer Tab to see the result. Click on the marker on the map below to display the popup.
library(leaflet)
leaflet(width = "100%")%>%addTiles(attribution = "data © mapsnigeriainitiative 2016")%>%
setView(lng = 8.0, lat = 9.0, zoom = 6)%>%
addMarkers(lng=8.70, lat=9.80, popup="point") #Add a marker with popup
Join from PC, Mac, Linux, iOS or Android: https://zoom.us/j/9054159262 for the online training course at “14.00 GMT (West african Time) October 1, 2016”