layer.get(id) to layer.getProperties().id