Welcome to WebmasterWorld Guest from 54.196.212.62

Forum Moderators: open

Message Too Old, No Replies

Using singleSelect but leaving background selections on and retrieving

Imagemapster singleSelect jQuery

     

Spudlogic

4:31 am on May 2, 2013 (gmt 0)



I think I'm pretty close. The idea is to have the background sections turned on according to the data from the API (this one, if you want to try it [propertysolutions.com...] and still have the functionality of mouseover and select. To get me close I used James' Beatles demo. I'm about there but can't seem to add singleSelect without turning off the background.

$(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);
});

Fiddle - [jsfiddle.net...]

Would love to hear some suggestions. Thanks!
 

Featured Threads

Hot Threads This Week

Hot Threads This Month