NewSignature / us-map

An interactive map of the United States using Raphaël
BSD 2-Clause "Simplified" License
279 stars 184 forks source link

how to add if condition in stateSpecificStyles #76

Closed iamabhishekp closed 4 years ago

iamabhishekp commented 5 years ago

Hi I am wondering to add some conditions in stateSpecificStyles but does not make it,i am trying somthing like this,

$('#map2').usmap({ 'stateSpecificStyles': { if(stateCode == 'AL') 'AL': { fill: 'green' }, if(stateCode == AK) 'AK': { fill: 'red' } },

Is there any other way to do that? can i use for loop or somthing here? please help