jvectormap标记标签图像

有谁知道如何将两个不同的图像添加到两个不同的标记的标签?

$('#map').vectorMap({ markerStyle: { initial: { fill: '#F8E23B', stroke: '#383f47' } }, backgroundColor: '#383f47', markers: [ {latLng: [46.90, 8.45], name: "Italy"}, {latLng: [26.02, 50.55], name: 'Bahrain'}, ], onMarkerLabelShow: function(event, label, code) { label.html("
"+ label.html()); } });

这会在两个标记上显示相同的图像

您可以为hover标记时可以检索的每个标记添加额外的属性image

 var markers = [ { latLng: [46.90, 8.45], name: "Italy", image: 'italy.png' }, { latLng: [26.02, 50.55], name: 'Bahrain', image: 'bahrain.png' }, ]; $('#map').vectorMap({ markerStyle: { initial: { fill: '#F8E23B', stroke: '#383f47' } }, backgroundColor: '#383f47', markers: markers, onMarkerLabelShow: function(event, label, index) { label.html('
' + label.html()); } });