highmaps デモで、マップを正常にロードしました。スクリプトは次のとおりです。
<script src="http://code.highcharts.com/maps/modules/exporting.js"></script>
<script src="http://code.highcharts.com/mapdata/countries/cn/custom/cn-all-sar-taiwan.js"></script>
(ハイマップはrequire.jsによってロードされています)
highmap ディレクティブ:(私は angular.js が好きです)
$scope.$on('mapInit', function(){
element.highcharts('Map',{
title : {
text : 'Highmaps basic demo'
},
subtitle : {
text : 'Source map'
},
mapNavigation: {
enabled: true,
buttonOptions: {
verticalAlign: 'bottom'
}
},
colorAxis: {
min: 0
},
series : [{
data : data,
mapData: Highcharts.maps['countries/cn/custom/cn-all-sar-taiwan'],
joinBy: 'hc-key',
name: 'Random data',
states: {
hover: {
color: '#BADA55'
}
},
dataLabels: {
enabled: true,
format: '{point.name}'
}
}]
});
});
これは成功です!しかし、ファイルをダウンロードすると:
ローカルファイルとして、
<script src="./maps/modules/exporting.js"></script>
<script src="./mapdata/countries/cn/cn-all-sar-taiwan.js"></script>'
mapdata: mapData: を変更します。Highcharts.maps['countries/cn/cn-all-sar-taiwan']
地図が表示されなくなりました!</p>
mapData に何か問題があると思うので、highmaps API を検索しようとしましたが、何もありません...
私を助けてください!