{"action":"created","issue":{"url":"https://api.github.com/repos/manifestinteractive/jqvmap/issues/209","repository_url":"https://api.github.com/repos/manifestinteractive/jqvmap","labels_url":"https://api.github.com/repos/manifestinteractive/jqvmap/issues/209/labels{/name}","comments_url":"https://api.github.com/repos/manifestinteractive/jqvmap/issues/209/comments","events_url":"https://api.github.com/repos/manifestinteractive/jqvmap/issues/209/events","html_url":"https://github.com/manifestinteractive/jqvmap/issues/209","id":131997498,"number":209,"title":"Colour of selected countries overwritten when passing colours","user":{"login":"andreasspeck","id":8565400,"avatar_url":"https://avatars.githubusercontent.com/u/8565400?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasspeck","html_url":"https://github.com/andreasspeck","followers_url":"https://api.github.com/users/andreasspeck/followers","following_url":"https://api.github.com/users/andreasspeck/following{/other_user}","gists_url":"https://api.github.com/users/andreasspeck/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasspeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasspeck/subscriptions","organizations_url":"https://api.github.com/users/andreasspeck/orgs","repos_url":"https://api.github.com/users/andreasspeck/repos","events_url":"https://api.github.com/users/andreasspeck/events{/privacy}","received_events_url":"https://api.github.com/users/andreasspeck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-07T18:51:10Z","updated_at":"2016-02-08T07:45:58Z","closed_at":null,"body":"I'm not sure this is meant to be the case or not.\r\n\r\nI have a map where country gets assigned a colour according to certain criteria (conflict status in a given year or year range). As these colours change, when someone clicks a year selector I am updating all country colours using jQuery('#vmap').vectorMap('set', 'colors', colourobj );\r\n\r\nThis works fine.\r\n\r\nHowever, if I have some countries selected on the map (and the select colour is set properly), assigning the colours with the above command overwrites the select colour. Nevertheless, it still knows it is selected (I think), as I need to click the country twice to reselect it and get the select colour back.\r\n\r\nI can obviously assign the country the colour for selected countries, but then it would not revert to the colour according to conflict status when I deselect the country.\r\n\r\nAs a workaround (and I actually also need this for another reason: keeping selection via a select list and the map in sync) I am trying to dynamically update the selected countries via jQuery('#vmap').vectorMap('set', 'selectedRegions', \"['us, gb']\" ); - but that always gives me an error (TypeError: undefined is not an object (evaluating 'e[\"set\"+arguments[1].charAt(0).toUpperCase()+arguments[1].substr(1)].apply')), no matter if I pass the selected regions as string (above) or as array.\r\nThe string is correct\r\n\r\nAny ideas what I am doing wrong here?"},"comment":{"url":"https://api.github.com/repos/manifestinteractive/jqvmap/issues/comments/181243316","html_url":"https://github.com/manifestinteractive/jqvmap/issues/209#issuecomment-181243316","issue_url":"https://api.github.com/repos/manifestinteractive/jqvmap/issues/209","id":181243316,"user":{"login":"andreasspeck","id":8565400,"avatar_url":"https://avatars.githubusercontent.com/u/8565400?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasspeck","html_url":"https://github.com/andreasspeck","followers_url":"https://api.github.com/users/andreasspeck/followers","following_url":"https://api.github.com/users/andreasspeck/following{/other_user}","gists_url":"https://api.github.com/users/andreasspeck/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasspeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasspeck/subscriptions","organizations_url":"https://api.github.com/users/andreasspeck/orgs","repos_url":"https://api.github.com/users/andreasspeck/repos","events_url":"https://api.github.com/users/andreasspeck/events{/privacy}","received_events_url":"https://api.github.com/users/andreasspeck/received_events","type":"User","site_admin":false},"created_at":"2016-02-08T07:45:58Z","updated_at":"2016-02-08T07:45:58Z","body":"Might be the same as #207 "}}