有谁知道如何让groupBy
函数在maphighlight插件中工作?我希望能够在地图上拥有一组国家,无论您在鼠标悬停的组中的哪个国家/地区都能够突出显示。我连一个人都无法工作。我能找到的文档非常稀少。groupBy功能在maphilight jquery插件
我加入以下的国家集团中的每个地图区域我想组:
href="#" class="no-hand centralasia" alt="Russia" data-maphilight='{"groupBy":".centralasia"}' onmouseover="MM_showHideLayers('Russia','','show')" onmouseout="MM_showHideLayers('Russia','','hide')">
我不知道这一点:
data-maphilight='{"groupBy":".centralasia"}'
我只使用头部的默认值,因为我不知道我应该在那里添加什么,如果有的话。我也加载了元数据插件。
<script>$(function() {
$('.map').maphilight({fade: false});
});
$.fn.maphilight.defaults = {
fill: true,
fillColor: '000000',
fillOpacity: 0.3,
stroke: false,
strokeColor: 'E77200',
strokeOpacity: 1,
strokeWidth: 1,
fade: true,
alwaysOn: false,
neverOn: false,
groupBy: ("philippines",true)
}
</script>
所有的帮助是非常感谢,因为我真的需要尽快得到这个工作。
欢呼每一个人。
戴夫
请批准了答案。如果它解决了你的问题。 :) –