http://s16.postimg.org/99hve381x/anatomy.png
单击路径后我正在尝试缩放,是否可以在缩放后允许另一个映射?
这是我正在尝试的代码,
var showAll = false;
jQuery(document).ready(function () {
jQuery('#vmap').vectorMap(
{
map: 'male_anatomy',
backgroundColor: '#a5bfdd',
borderColor: '#818181',
borderOpacity: .50,
borderWidth: 1,
color: '#f4f3f0',
enableZoom: true,
hoverColor: '#c9dfaf',
hoverOpacity: null,
normalizeFunction: 'linear',
scaleColors: ['#b6d6ff', '#005ace'],
selectedColor: '#c9dfaf',
selectedRegion: null,
showTooltip: true,
onRegionClick: function (element, code, region) {
$('path').each(function () {
if (showAll) {
$(this).show();
} else {
$(this).hide();
}
});
if (showAll) { showAll = false; } else { showAll = true; }
var id = '#jqvmap1_' + code;
$(id).show();
}
});
});