# import map plugin and display two (lon,lat) locations
if (interactive()) {
ec.init(preset= FALSE,
geo = list(map= 'china-contour', roam= TRUE),
series = list(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( paste0('https://raw.githubusercontent.com/apache/echarts/',
'master/test/data/map/js/china-contour.js') )
}
Run the code above in your browser using DataLab