The last section for this chapter is about the OpenLayers'
ol.Collection. As mentioned, the
Collection class is not a super class like
Object, but it is an integral part of the relationship model. Many classes in OpenLayers make use of the
Collection class to manage one-to-many relationships.
At its core, the
Object class and inherits the functionality of both
Object. This makes the
Collection class extremely powerful and we will use it many times in the rest of this book.
A collection is created just like any other class, just use the new operator: ...