我使用jquery,ImageMapster和PHP。
脚本运行良好,如果我加载图像,我的区域是在,但当我移动我的mouseOver图像的高亮变化(正常),但…当我把我的mouseOut的img,我没有选择区域,并希望我的默认区域上。
我解决了这个问题,使用mouseOut调用始终相同的区域。我想做正确的事。
<script type="text/javascript">
function mapearImagenVistaGeneral(id) {
$(id).mapster({
mapScale : true,
fillOpacity : 0.4,
fillColor : "fff000",
stroke : true,
strokeColor : "000",
strokeOpacity: 0.8,
strokeWidth : 4,
singleSelect : true,
mapKey : 'name',
listKey : 'name',
showToolTip : true,
onMouseout: function (e) {
$('#imgAlmacen1VistaGeneral').mapster( 'highlight','01');
}
});
};
mapearImagenVistaGeneral("#imgAlmacen1VistaGeneral");
$('#imgAlmacen1VistaGeneral').mapster( 'highlight','01'); 发布于 2019-01-15 18:30:48
两天后,我终于找到了解决方案,在写了stackoverflow之后…
我必须设置一个区域。
<script type="text/javascript">
function mapearImagenVistaGeneral(id) {
$(id).mapster({
mapScale : true,
fillOpacity : 0.4,
fillColor : "fff000",
stroke : true,
strokeColor : "000",
strokeOpacity: 0.8,
strokeWidth : 4,
singleSelect : true,
mapKey : 'name',
listKey : 'name',
showToolTip : true,
areas: [{
key: '01',
staticState: true,
render_select: {
fillOpacity: 0.4,
fillColor: '0000ff'
}}
]
});
};
mapearImagenVistaGeneral("#imgAlmacen1VistaGeneral"); https://stackoverflow.com/questions/54196554
复制相似问题