AmMap主题不起作用

时间:2014-10-03 13:56:56

标签: javascript svg themes ammap

我成功创建了一个AmMap。现在我想对它应用一个主题,并按照本教程中的说明进行操作:

http://www.amcharts.com/tutorials/working-with-themes/

但是,出于某种原因,即使主题CSS已加载,它也无法正常工作。有什么建议可能是错的吗?

我的代码是:

<html>
<script src="/js/ammap/ammap.js" type="text/javascript"></script>
<script src="/js/ammap/themes/dark.js" type="text/javascript"></script>
<body>
<script>


AmCharts.ready(function() {
    var map = new AmCharts.AmMap(AmCharts.themes.dark);
    map.pathToImages = "/js/ammap/images/";

    var dataProvider = {
        mapURL: "cz_okresy.svg",
        getAreasFromMap:true                    
    }; 

    map.dataProvider = dataProvider;

    map.areasSettings = {
        rollOverOutlineThickness:1,
        outlineThickness:1,
        rollOverOutlineAlpha:1,
        rollOverAlpha:0.8,
        alpha:0.5,
        outlineAlpha:1,
    };

    map.label = {
        text: "20",
    }

    map.write("mapdiv");
});
</script>
<div id="mapdiv" style="width: 90%; height: 90%;"></div>
</body>
</html>

以上结果如下: http://meteopage.com/beta/czdistrictmap.html

0 个答案:

没有答案