如何在Vue的highmaps(highcharts)中导入并连接“OpenStreetMap”的模块“https://code.highcharts.com/maps/modules/tiledwebmap.js”? 如果您能发送一个示例演示,那就太好了。
设置与 Vanilla JS 设置几乎相同,唯一的区别是您需要在应用程序中导入并初始化 TiledWebMap 模块。
import Highcharts from "highcharts";
import MapsModule from "highcharts/modules/map";
import TiledWebMap from "highcharts/modules/tiledwebmap";
import HighchartsVue from "highcharts-vue";
MapsModule(Highcharts);
TiledWebMap(Highcharts);
演示: https://codesandbox.io/p/sandbox/nostalgic-https-j59mgn?file=%2Fsrc%2Fmain.js%3A4%2C1-13%2C25
参考资料:
https://www.highcharts.com/docs/maps/tiledwebmap
https://github.com/highcharts/highcharts-vue?tab=readme-ov-file#importing-highcharts-modules