Php 使用singleSelect但保留背景选择并从API检索数据
我想我已经很接近了。我们的想法是根据API中的数据打开背景部分(如果您想尝试的话,这一部分),并且仍然具有mouseover和select的功能。 为了接近我,我用了詹姆斯的披头士演示。我马上就要到了,但如果不关闭背景,我似乎无法添加singleSelectPhp 使用singleSelect但保留背景选择并从API检索数据,php,jquery,imagemapster,Php,Jquery,Imagemapster,我想我已经很接近了。我们的想法是根据API中的数据打开背景部分(如果您想尝试的话,这一部分),并且仍然具有mouseover和select的功能。 为了接近我,我用了詹姆斯的披头士演示。我马上就要到了,但如果不关闭背景,我似乎无法添加singleSelect $(function () { var inArea, map = $('#beatlesIMG'), single_opts = { fillColor: '000000', fillOpacit
$(function () {
var inArea,
map = $('#beatlesIMG'),
single_opts = {
fillColor: '000000',
fillOpacity: 0,
stroke: true,
strokeColor: 'ff0000',
strokeWidth: 2
},
all_opts = {
fillColor: 'ffffff',
fillOpacity: 0.6,
stroke: true,
strokeWidth: 2,
strokeColor: 'ffffff'
},
initial_opts = {
mapKey: 'data-name'
};
opts = $.extend({}, all_opts, initial_opts, single_opts);
map.mapster('unbind')
.mapster(opts)
map.mapster('set_options', all_opts)
.mapster('set', true, 'all')
.mapster('set_options', single_opts);
});
小提琴-
我想听听你的建议。谢谢 这对我来说很有用
$(function ()
{
var basic_opts = {
mapKey: 'data-key1',
fill: true,
fillColor: '9A7611',
fillOpacity: 0.4,
singleSelect: true
};
var initial_opts = $.extend({},basic_opts,
{
staticState: true,
fill: true,
fillColor: 'F9461C',
stroke: false
});
$('#floorplan').mapster(initial_opts)
.mapster('snapshot')
.mapster('rebind',basic_opts );
});