在vue中使用highmaps画一个中国城市分布图(需要定位经纬度),根据官网给的例子:https://jshare.com.cn/highmaps/M9tzGW/1
,
需要引入这个库,我试着在页面引入,但是还是没有效果
import $ from 'jquery'
import Highcharts from 'highcharts'
import Highmaps from 'highcharts/modules/map'
import * as proj4 from 'proj4'
Highmaps(Highcharts);
页面的报错信息:(大概是提示你没有引入proj4)Highcharts error #22: www.highcharts.com/errors/22
但是我打印了一下console.log(proj4) 是已经成功引入了的,但是却没有在highmaps中生效,想请教下各位有没有经历过这个问题?是怎么解决的?
不是说需要在之前引入么?你把pro4j放到highcharts前面呢
如果不行,你试试直接在页面最上方通过script引入这个脚本呢?