Read geoJSON file to be used in a map chart
Deprecated since v.1.7.0, use ec.init(registerMap=...) instead.
Arguments
- wt
An
echartywidget as returned by ec.init.- name
Name of map.
- data
A string starting with http or file. URL strings ending with .svg are assumed to be SVG map files.
Could also be a valid geoJSON or SVG text string. SVG strings start with either <?xml or <svg.
Details
This command replaces the manual setting through p$x$registerMap.
It should always be piped after ec.init.
There should be one map series with attribute 'map' matching the name parameter.
Examples
data.frame(name= c('Texas', 'California'), value= c(111, 222)) |>
ec.init( color= c('lightgray'), visualMap= list(min=111),
series.param= list(type= 'map', map= 'usa')
) |>
ec.registerMap('usa', 'https://echarts.apache.org/examples/data/asset/geo/USA.json')
#> ec.registerMap() is deprecated. Use ec.init(registerMap=...) instead.
