use legendinterface instead of map layers registry to loop over layers