Javascript 如何在Jvector地图中获取国家代码?

Javascript 如何在Jvector地图中获取国家代码?,javascript,jvectormap,Javascript,Jvectormap,我用的是矢量地图。它现在正在使用onRegionTipShow函数。如何将其更改为onRegionClick 当我改变它时,它不起作用。如何在点击时获取jvectormap中的国家代码 jQuery.noConflict(); jQuery(function () { var $ = jQuery; $('#focus-single').click(function () { $('#map1').vectorMap('set', 'focus', {

我用的是矢量地图。它现在正在使用onRegionTipShow函数。如何将其更改为onRegionClick

当我改变它时,它不起作用。如何在点击时获取jvectormap中的国家代码

jQuery.noConflict();
jQuery(function () {
    var $ = jQuery;
    $('#focus-single').click(function () {
        $('#map1').vectorMap('set', 'focus', {
            region: 'AU',
            animate: true
        });
    });
    $('#focus-multiple').click(function () {
        $('#map1').vectorMap('set', 'focus', {
            regions: ['AU', 'JP'],
            animate: true
        });
    });
    $('#focus-coords').click(function () {
        $('#map1').vectorMap('set', 'focus', {
            scale: 7,
            lat: 35,
            lng: 33,
            animate: true
        });
    });
    $('#focus-init').click(function () {
        $('#map1').vectorMap('set', 'focus', {
            scale: 1,
            x: 0.5,
            y: 0.5,
            animate: true
        });
    });
    $('#map1').vectorMap({
        map: 'world_mill_en',
        panOnDrag: true,
        focusOn: {
            x: 0.5,
            y: 0.5,
            scale: 1,
            animate: true
        },
        series: {
            regions: [{
                scale: ['#688FA0'],
                normalizeFunction: 'polynomial',
                values: {

                    //"DZ": 158.97,
                    // "AZ":1.1,
                    "AG": 1.1,
                    // "AE":7.54,
                    // "AO":5.6,
                    "AR": 351.02,
                    //"AM":3.96,
                    "AU": 1219.72,
                        "AT": 366.26,
                    //"AF":3.96,
                    // "AL":3.96,
                    //"BS": 7.54,
                    "BH": 21.73,
                    // "BI":4.45,
                    "BB": 3.96,
                    //"BY": 52.89,
                    "BE": 461.33,

                }
            }]
        },
        onRegionTipShow: function (e, label, code) {
            var code = label.html();

            switch (code) {
                case 'Argentina':
                    label.html("<div style='height:129px;width:296px;Length:98px'><b>Country</b>:&nbsp  Argentina<br/><b>Category</b>:&nbsp  Approved<br/><b>PDP GCO Region</b>:&nbsp  South America<br/><b>Comments</b>:&nbsp  Have had delays with regulatory submissions/approvals. As long as advanced planning is taken into consideration this country should be okay.</br><b>CCL</b>:&nbsp Mariana Bodmer</div>");
                    break;
当你改变它时,什么是不起作用的?我们可以看看你想做什么吗?