使用R添加一层医院以在传单中进行映射

时间:2017-12-13 20:08:50

标签: r leaflet openstreetmap

我制作了一张带有波士顿地铁多边形的传单地图, 有没有办法增加一个显示医院和诊所的附加层呢?

我尝试搜索图层,我找到的唯一链接是

http://leaflet-extras.github.io/leaflet-providers/preview/

没有医院的专用层

我的代码如下:

leaflet(boston_alldata) %>%
  addProviderTiles('CartoDB.Positron', options = tileOptions(minZoom=10, maxZoom=18)) %>%
  setView(-71.0589, 42.3601, zoom = 11) %>%
  addPolygons(data = boston_shp,popup = ~Name,
              stroke = TRUE, weight = 2,
              color = 'gray')%>%
  clearMarkers() %>%
  addCircleMarkers(popup=paste0("Neighborhood:"," ",boston_alldata$neighborhood,","," ",boston_alldata$zip,"<br>",boston_alldata$legend, "<br>", boston_alldata$freq, " observations","<br>","Population Rate: ",boston_alldata$populationrate," per 100,000"),
                   fillOpacity = 0.5,
                   color = ~pal1(boston_alldata$q))%>%
  addLegend("bottomleft",pal = pal1, values = boston_alldata$q,
            title = "Quantiles",opacity = 1)%>%
  addSearchOSM() %>%
  addFullscreenControl%>%
  addMiniMap(tiles = providers$Esri.WorldStreetMap,
             toggleDisplay = T)

传单如下

Leaflet Map

0 个答案:

没有答案