jamietre/ImageMapster — Issue #24: Multiple colors & selection status
Author: rlkmktg
Created: 2011-10-20 16:27:31+00:00
State: open

Having trouble assigning different colors and selectable/deselectable option depending on listkey value. What I'm trying to do is select specific areas upon page load (and make them unselectable) while allowing selection of other areas. i'd like the two in different colors if possible. Here's the code:

$('#wt_chart').mapster({
fillOpacity: 0.4,
fillColor: "d42e16",
stroke: false,
singleSelect: false,
mapKey: '',
listKey: 'status',
onClick: function (e) {
if ($(this).attr ('status') == "resvd") {
alert ("seat previouslty reserved.");
return;
}
$(this).attr ('status', 'temp');
},
showToolTip: false,
areas: [
{ key: "open", fillColor: "FFFFFF" },
{ key: "resvd", fillColor: "FAFAFA", selected : true, isDeselectable : false },
{ key: "temp", fillColor: "BCBCBC", selected : true }
]

});

PS: If I assign the same value to both mapKey and listKey, I get an error. it's one or the other.

PPS: Had trouble running the minimized script in Win7/Firefox. Had to use the full code.