传单地图上的破碎的图像标记

时间:2016-06-01 14:14:47

标签: r shiny leaflet

大家下午好,我认为截图会说得比文字好: I would like a real marker instead of what is actually printed...

这是相应的server.R代码的一部分(其中fixed_points是一个带有纬度/经度坐标的nrow(fixed_points)x 2矩阵

library(shiny); library(rCharts); library(leaflet)
output$baseMap  <- renderMap({
  baseMap <- Leaflet$new()
  baseMap$setView(c(lng = 2.812500, lat = 46.732331), zoom = 6)
  baseMap$tileLayer(provider = "Stamen.TonerLite")
  for (i in 1:nrow(fixed_points)) {baseMap$marker(c(fixed_points[i, "lat"], fixed_points[i, "lon"]))}
  baseMap$fullScreen(TRUE)
  baseMap
})

和ui.R

showOutput("baseMap", "leaflet") // or chartOuput(...), it works the same

提前致谢!

0 个答案:

没有答案