澳大利亚地图-没有输尿管

问题描述 投票:0回答:1

从这里获得代码:

Map Australian cities - R spatial

但是当我运行它时,它给出了显示的地图:

library(maps)
df <- world.cities[world.cities$country.etc == "Australia",]

library(leaflet)

## define a palette for hte colour
pal <- colorNumeric(palette = "YlOrRd",
                    domain = df$pop)



library(leaflet)

## define a palette for hte colour
pal <- colorNumeric(palette = "YlOrRd",
                    domain = df$pop)

leaflet(data = df) %>%
    addTiles() %>%
    addCircleMarkers(lat = ~lat, lng = ~long, popup = ~name, 
                     color = ~pal(pop), stroke = FALSE, fillOpacity = 0.6) %>%
    addLegend(position = "bottomleft", pal = pal, values = ~pop)

enter image description here

我在这里想念什么?

r leaflet maps
1个回答
0
投票

您尚未运行此部分代码

© www.soinside.com 2019 - 2024. All rights reserved.