Add isLegendExpanded property to layer

Define if legend should be expanded by default
hopefully fix tests
Merge pull request #648 from tonio/legendexpanded

Add isLegendExpanded property to layer