0

So far that plugin works quite nice...got no probs at all. However I just noticed that "onRegionClick" changes the color of the choosen country and I would like to prevent that. ^^

Config:

jQuery('#vmap').vectorMap({ 
    ...
    backgroundColor: '#FFFFFF',
    ...
    color: '#F3F3F3',
    hoverColor: '#FCD452',
    selectedColor: '#397ACB',
    multiSelectRegion: true,
    ...

After loading the map every selected country got that nice #397acb blue but after clicking on it, it changes to #f3f3f3...how do I prevent that?

Thx!

TZP
  • 53
  • 5

2 Answers2

1

Ok, I got some kind of workaround.

onRegionClick: function (event, code, region) {
    jQuery('#jqvmap1_'+code).css('fill', '#397ACB');
}

This way I prevent him from altering the color, although I still would like to know why he changes the color on click. ^^ Maybe one day.....

TZP
  • 53
  • 5
0

Most of the options can be changed after initialization using the following code: jQuery('#vmap').vectorMap('set', 'colors', {us: '#0000ff'});.