Use the method toLowerCase() for all strings or build a regular expression to make a test
var reg=/city1|city2|city3|city4/i;[COLOR="#0000FF"]// with a i for ignore case[/COLOR]
// Then use
else if (plotOptChbox[4].checked == true && reg.test(citiesmarkers[i].get('City'))) {/...
}
NB : The eleven following «metacharacters» must be preceded by a back slash :
the opening square bracket [, the backslash \, the caret , the dollar sign $, the period or dot ., the vertical bar or pipe symbol |, the question mark ?, the asterisk or star *, the plus sign +, the opening round bracket (, and the closing round bracket ).
In the absence of these characters the regular expression can be constructed with such a simple
var reg=new RegExp("city1|city2|city3|city4","i");