Many Markers – Select NYC Points of Interest

November 29, 2007

library(leaflet)
iconNYC <- makeIcon(
  iconUrl = "http://botw-pd.s3.amazonaws.com/newyorkcity_logo.png",
  iconWidth=20*215/230, iconHeight=21,
  iconAnchorX=20*215/230/2, iconAnchorY=16)

nycLatLong <- data.frame(
  lat = c(40.758, 40.733, 40.779, 40.811, 40.752, 40.758, 40.723),
  lng = c(-73.985, -74.002, -73.963, -73.946, -73.977, -73.978, -74.002))
nycSites <- c(
"<a href = 'https://www.timessquarenyc.org'>Times Square' a>",
"<a href = 'https://www.nycgo.com/boroughs-neighborhoods/m a nhattan/greenwich-village/a'>Greenwich Village'a>",
"<a href = 'https://www.metmuseum.org'>Metropolitan Museum of Art'a>",
"<a href = 'https://www.nycgo.com/articles/must-see-harlem'>Harlem Must See'a>",
"<a href = 'http://www.grandcentralterminal.com/transportation/'>Grand Central Station'a>",
"<a href = 'https://www.rockefellercenter.com'>Rockefeller Center'a>",
"<a href = 'http://www.sohonyc.com'>SOHO'a>"
  )

nycLatLong %>%
  leaflet() %>%
  addTiles() %>%
  addMarkers(icon = iconNYC, popup = nycSites)