Modifying layer appearance
We already saw how to perform some basic layer appearance modifications in the Changing layer opacity recipe in Chapter 2, Adding Raster Layers. We also saw how to reorder the layer stack and show or hide layers. This kind of layer modification may be sufficient for the majority of web-mapping applications, but we're going to take a look at some other more advanced techniques for this recipe.
During this recipe, we will modify the appearance of the raster tiles that are returned from the tile service. As we know, raster tiles are returned as images, which means that we can manipulate the color of the images when they're applied through the canvas renderer.
Color manipulation can also be performed on the server (perhaps a proxy server) before returning the modified tiles to the browser. Alternatively, if you're in control of the tile service itself, you could offer the raster tiles in a different color scheme.
We, of course, will look at how this can be achieved in...