Selection is mainly achieved through vector layers. So, a small introduction to data conversion can be useful.
In this section, we want to introduce you to the creation of static data in a particular vector, which is required in most cases where there is a need to click on your map to get information.
Let's see how you can provide vector data to our OpenLayers 3 library. We will not explain again how to work with vectors here—just how to provide them.
If you remember, we told you in Chapter 1, Getting Started with OpenLayers, in the section Anatomy of a web-mapping application, that the OpenLayers 3 library can consume dynamic vector data or static. The main difference resides in the fact that data is dynamically provided on demand. At the end of it all, OpenLayers consumes the same formats.
As a reminder for vector layers, the main following formats are supported: