library(svis) ## Get the sample data pts <- sample_data("asf") ## Define the popup text pts@data$popup_text <- paste(pts@data[,"K\u00F6n"], pts@data$Status, sep = "<br>") ## Put the data in a map layer body <- page_body(map_div(layer(pts, layer_title = "ASF", fillColor = shQuote("#ff0000")))) ## Add a page header page <- page_page(page_header(), body) ## view this pag map <- tempfile(fileext = "html") capture.output(page, file = map)
Then view the page
browseURL(map)
map <- "../inst/doc/map4.html" capture.output(page, file = map) knitr::include_url(basename(map), height = "1000px")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.