This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
library(leaflet)
## Warning: package 'leaflet' was built under R version 3.4.4
cinema_map <- leaflet() %>%
addTiles() %>%
addMarkers(lat = 23.4241, lng = 53.8478, popup = "UAE")
cinema_map
cinemaIcon <- makeIcon(
iconUrl = "https://cdn2.iconfinder.com/data/icons/photo-and-video/500/Camera_cinema_consume_entertainment_film_media_movie_photo_play_record_video_television_theater-512.png",
iconWidth = 40*215/230, iconHeight = 40,
iconAnchorX = 40*215/230/2, iconAnchorY = 25
)
cinemaLatLong <- data.frame(
lat = c(25.3446, 25.4052, 25.3463, 25.3309),
lng = c(55.3987, 55.5136, 55.4209, 55.3759))
cinemaLatLong %>%
leaflet() %>%
addTiles() %>%
addMarkers(icon = cinemaIcon)
cinemaSites <- c(
"<a href='https://www.cinemauae.com/sharjah/mega-mall-cinema/'>Mega Mall</a>",
"<a href='https://uae.voxcinemas.com/cinemas/city-centre-ajman'>Ajman City Center</a>",
"<a href='http://www.citycentresharjah.com'>Sharjah City Center </a>",
"<a href='https://www.cinemauae.com/sharjah/buhaira-novo-cinema/'>Grand Buheria</a>"
)
cinemaLatLong %>%
leaflet() %>%
addTiles() %>%
addMarkers(clusterOptions = markerClusterOptions(), icon = cinemaIcon, popup = cinemaSites)