+20. This is a pretty nice looking choropleth map, but there's no figure to ground relationship, no geographic context surrounding Lucas County. We could add additional state and county layers to create that context, but we can also place this choropleth map on top of a basemap. Although adding transparency to choropleth maps is a big no-no, in our enxt activity we'll be placing this map over a basemap well-suited for such a cartographic deviance.<br><br>To get that transparency in our polygon fill, we need to make a slight adjustment to our polygon-fill specifications. We can adjust transparency in RGB colors through the alpha channel, but at the moment our style doesn't address transparency. Our fill is fully opaque. To adjust that alpha channel is quite simple. Instead of `polygon-fill: rgb(...)` we need to use `polygon-fill: rgba(...)`. The **a** in rgba is our alpha channel and it allows us to add a fourth value in our color specification. We can select a number, 0 (totally transparent) - 1 (totally opaque), to adjust the opacity of the fill. Let's use 0.5. Your polygon fill formatting should look something like this:<br><br>`[p_hung<1] {polygon-fill: rgba(255,255,204,0.5);}
0 commit comments