Web maps are very popular today, and are growing in popularity. After Google Maps was introduced, there was an explosion of interactive web maps. Google provides an API to interact with its mapping service, as others do now, and OpenLayers works well with most of them. Not only can we use these third-party APIs with OpenLayers, we can also mash up other layers on top of them. Those services are the most popular, but they suffer from bottleneck depending on your web mapping application. So, you need to know mainstream API and alternatives to display raster images.
In this chapter, we will learn the following:
A layer is basically a way to show multiple levels of information independent of each other. Layers are not just a mapping or cartography concept; graphic designers and digital artists make heavy use of layers.
Imagine a printed map of a city. Let's say you also have two sheets of transparent paper. One sheet has blue lines that indicate bus routes, and the other sheet contains green lines that indicate bicycle routes. Now, if you placed the transparent sheet of paper with bicycle routes on top of the map, you will see a map of the city with the bicycle routes outlined.
Putting on or taking off these transparent pieces of paper will be equivalent to turning a layer on or off. The order you place the sheets on top of each other also affects what the map will look like—if two lines intersect, you will either see the green line or the blue line on top. This is the basic concept of a layer.