jamietre/ImageMapster — Issue #37: Multiple altImages for selected state
Author: SpaceBeers
Created: 2011-12-23 11:58:13+00:00
State: open

I've been trying to use more than one image for different areas and I'm coming up blank on using multiple alternate images as selected states. It works fine when it's fillColor etc but not images. Any ideas? Code below:

var map = $('#dom_global');
map.mapster({
mapKey: 'data-name',
isSelectable:false,
render_select: {
fillOpacity: 0.9,
fillColor: 'ff0000'
},
areas: [
{
key: 'appartment-2',
staticState: true,
selected: true
},
{
key: 'appartment-4',
staticState: true,
selected: true
},
{
key: 'appartment-7',
staticState: true,
selected: true
},
{
key: 'appartment-8',
staticState: true,
selected: true
},
{
key: 'appartment-11',
staticState: true,
selected: true
},
{
key: 'appartment-14',
staticState: true,
selected: true
},
{
key: 'appartment-17',
staticState: true,
selected: true
},
{
key: 'appartment-18',
staticState: true,
selected: true
},
{
key: 'appartment-20',
staticState: true,
selected: true
},
{
key: 'appartment-22',
staticState: true,
selected: true
},
{
key: 'appartment-27',
staticState: true,
selected: true
},
{
key: 'appartment-31',
staticState: true,
selected: true
}
]
})
.mapster('snapshot')
.mapster('rebind', {
mapKey: 'id',
isSelectable:false,
render_select: {
fillOpacity: 0.9,
fillColor: '00ff00'
},
areas: [{
key: 'appartment-25',
staticState: true,
selected: true
}]
},true);