Description Usage Arguments See Also Examples
Add zoom and roam controller to map.
1 2 3 4 5 |
p |
an echart object. |
show |
set to |
z, zlevel |
first and second grade cascading control, the higher z the closer to the top. |
x |
x position; |
y |
y posotion; |
width, height |
dimensions of controller. |
backgroundColor |
background color. |
borderColor |
border color. |
borderWidth |
width of border. |
padding |
padding. |
fillerColor |
filler color. |
handleColor |
color of handle. |
step |
moving step of the 4 direction roam in px. |
mapTypeControl |
ou can specify every single mapType when multiple map in a chart at the same time, such as: |
... |
any other option to pass to controller. |
1 2 3 4 5 6 7 8 9 10 11 | coords <- data.frame(city = c("London", "New York", "Beijing", "Sydney"),
lon = c(-0.1167218, -73.98002, 116.3883, 151.18518),
lat = c(51.49999, 40.74998, 39.92889, -33.92001),
values = runif(4, 10, 20))
coords %>%
echart(city) %>%
emap() %>%
emap_coords(lon, lat) %>%
emap_points(values) %>%
emap_roam(mapTypeControl = list(world = TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.