For this example, we will render the country layer by styling each country based on income level by associating its country code to income level data provided by the world bank. There are quite a few brackets; so, we've simplified it to four levels:
poor. We'll draw each country in a color associated with its income level based on these brackets. Let's start from the previous example.
<script>tag, before anything else, we will define colors for the four brackets. Use any colours you like:
var high = [64,196,64,1]; var mid = [108,152,64,1]; var low = [152,108,64,1]; var poor = [196,32,32,1];