save the id used when adding layer
added default legend_icon
added the dom creation for legend