JVectorMap Javascript链接

时间:2015-11-29 21:23:21

标签: javascript jvectormap

我使用jvectormap创建地图,我试图添加链接链接到网站链接。我尝试了一些不同的东西,但似乎没有任何工作。我目前有这个:

$(函数(){

var markers = [
    { latLng: [-35.727014, 174.320861], name: "Whangarei", image: 'pin.png', style: {image: 'themes/startertoplight/img/pin.png'} },
];

/* map parameters */
var wrld = {
        map: 'nz_mill_en',
        backgroundColor: '#28343B',
        onRegionClick: function(event, code) {
    if (code === 'Whangarei') {
        window.location = 'http://www.google.com'
    }
    },
        zoomButtons: false,
        zoomOnScroll: false,
        focusOn: {
            x: 0.3,
            y: 0.7,
            scale: 3
        },
        markerStyle: {
            initial: {
                fill: '#F8E23B',
                stroke: '#383f47'
            }
        },
        markers: markers,

};

$('#nz-map').vectorMap(wrld);

});

知道如何让这个工作吗?感谢

0 个答案:

没有答案