Map tiles
Let's take a short break now and talk about just a little bit of theory. It has been mentioned that OpenLayers works by requesting 'map tiles' from a backend map server, but I haven't really gone much into what that means. Nearly all layers work on this map tiling principle (except the Vector layer and the Image layer). So, what is it exactly and how does it work?
Think of how you might go about creating a web map from scratch—specifically, how would you handle the map image itself? You could go about it in two ways. First, you could just send back one giant image of a map. If the user zooms in, the server sends back an even bigger, more zoomed in image of a map. Using this strategy, you'd very quickly be sending over exponentially large image files every time the user zooms. This is why this method is not really practical.
Many images make up a map
The second way is that you break up the desired map image into a bunch of smaller images, or map tiles. So, no matter how far the user...