Toggle selection of item under cursor. Has to option to prioritize the selected layer. In order to accomplish this, there is the priorityToSelectedLayer
option.
This option gives priority to the selected layer. This works only if there is a selected layer, and that selected layer is a {@link VectorLayer}. If all these checks are okay, but that particular layer is not visible, then nothing will happen. When one of the previous checks is not okay, the selection toggle will occur on the first object that is encountered. In other words it will depend on the layer drawing order, starting at the top.
@author Joachim Van der Auwera
@author Pieter De Graef