OpenLayers supports a multitude of different Layer classes. As you may recall from Chapter 1, each Layer class is associated with a different map server back end. The Layer.WMS
class is used to connect to a WMS map server, and the Layer.Google
class is used to connect to the Google Maps service.
Because OpenLayers is such an actively developed framework, there are a few layer classes that are deprecated (not recommended to use anymore). Later versions of OpenLayers will deprecate more Layer classes, so we'll try to focus on the classes that should be around for a while. We won't be able to cover every Layer class, but we will discuss the common ones. The Layer classes which we don't mention below will not be covered in this book, either because they are deprecated or outside the scope of this book. Let's take a look.