I wanted to trigger this discussion :)

What will `return layers[id][prop]` return when `id` does not exist in `layers`. Will it throw an exception? How are users of the function supposed to react?

I think that having to call another function every time before calling this function is cumbersome (ok, sometimes checking for existence might be omitted, but with our flexible layers definition based on topic, I don't think that's the normal use case)

Maybe we could have a getLayer function (returning layer by id, if it exists) and clients can decide for themselfes on how to get properties.