                 # Build layer group
                 layerGroup = renderedLayer.buildLayerGroup(this, options)
                 layerGroup.name = layer.name
+                layerGroup.renderedLayer = renderedLayer
                 @seriesReferencesLayers[layer.label] = layerGroup
                 @map.addLayer(layerGroup)
-                legend = @legend.getContainer()
-                legend.innerHTML += renderedLayer.buildLegend() if options.legend
 
           else
 

          for label, layer of @seriesReferencesLayers
            selector.addOverlay(layer, label)
            @layersScheduler.insert layer._leaflet_id

        if @edition? and @edition.getLayers().length > 0
          selector.addOverlay(@edition, @options.overlaySelector.editionLayer)

        this.map.addControl this.controls.reactiveMeasureControl



      this.controls.legend = new L.control(position: "bottomright")
      this.controls.legend.onAdd = (map) =>
        L.DomUtil.create('div', 'leaflet-legend-control')

      this.map.addControl this.controls.legend


      if this.options.multiLevels?
        legend = @controls.legend.getContainer()

        legend.innerHTML += this.buildMultiLevelLegend(this.edition)

