2017-01-19 37 views
0

我设法创建一个使用“Highmaps”(http://www.highcharts.com/maps/demo)挪威地图带县,当它选择一个县就深入到各市。我需要在下钻中捕捉select事件并根据市政府显示一些数据。但找不到任何钻取事件。Highmaps向下钻取地图选择事件

任何想法?

+0

在你连接有一个明细的演示,在你看到钻事件的网站。你在那里找到一个选定的国家 - 参见[示例](http://jsfiddle.net/k3z7r32m/) – morganfree

+0

只能从父映射触发,而不是向下钻取的映射。 –

回答

0

我的Highcharts服务台支持帮助了它。 这里是小提琴http://jsfiddle.net/bydfsxe2/

// Set drilldown pointers 
$.each(data, function (i) { 
    this.drilldown = this.properties['hc-key']; 
    this.value = i; // Non-random bogus data 
}); 

// Instanciate the map 
Highcharts.mapChart('container', { 
    chart: { 
     events: { 
      drilldown: function (e) { 
//call external function 
            alert(e.point.drilldown); 
//rest of the code