Replace for-loop with LayerStore's each-function in applyState

This PR removes an ``TODO`` tag within the code of the MapPanel's applyState function. Now the each-function of the LayerStore is used instead of a for-loop