# import map plugin and display two (lon,lat) locations
if (interactive()) {
durl <- paste0('https://raw.githubusercontent.com/apache/echarts/',
'master/test/data/map/js/china-contour.js')
ec.init( # load= durl,
geo = list(map= 'china-contour', roam= TRUE),
series.param = list(
type= 'scatter', coordinateSystem= 'geo',
symbolSize= 9, itemStyle= list(color= 'red'),
data= list(list(value= c(113, 40)), list(value= c(118, 39))) )
) |>
ec.plugjs(durl)
}
Run the code above in your browser using DataLab