用echarts地图的时候,china.js是正常的,但是用单个省的时候就报错
"Map jilin not exists. You can download map file on http://echarts.baidu.com/download-map.html"
而且我已经从官网上下载地图了,且也引用了
请问各位大神是什么原因?
下面是代码
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>map</title> </head> <body> <script src="echarts.js" type="text/javascript"></script> <script src="jquery-1.7.2.min.js" type="text/javascript"></script> <script src="provice/jilin.js"></script> <div id="main" style="width: 600px;height:400px;"></div> <script type="text/javascript"> var chart = echarts.init(document.getElementById('main')); chart.setOption({ series: [{ type: 'map', map: 'jilin' }] }); </script> </body> </html>
<html > <head> <meta charset='utf-8' > <title>echart</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> </style> </head> <body> <div id="main" style="width:600px;height:600px;"> </div> <script src="echarts.min.js"></script> <script src="jilin.js"></script> <script> var chart = echarts.init(document.getElementById('main')); //map名称查看下载的地图js内 echarts.registerMap('吉林' ... chart.setOption({ series: [{ type: 'map', map: '吉林' }] }); </script> </body> </html>
没毛病
o(╥﹏╥)o,我刚才才自己找到,谢谢!!!