     return valFn
 
 
-  # gets all mapped property values that are actually on the map
-  # Either gets all from the set mappingProperty or gets all from the default
-  # no mixing of default and set property!
-  deduceAllAvailableMappingOnMap = (map, mappingPropertyOnMap) ->
-    map.features.map (mapEntry) ->
-      if mappingPropertyOnMap
-        mapEntry.properties[mappingPropertyOnMap]
-      else
-        mapEntry.properties[defaults.mappingPropertyOnMap]
-
-
-  renderVisualization = (scope) ->
-    map = scope.map
-    data = scope.data
-    path = deducePathProjection(scope.projection)
-    valueProperty = scope.valueProperty
-    mappingPropertyOnMap = scope.mappingPropertyOnMap
-    mappingPropertyOnData = scope.mappingPropertyOnData
-    quantizeSteps = scope.quantizeSteps || defaults.quantizeSteps
-
-    renderMap(scope, map, path)
-
-    bounds =  path.bounds(map)
-    resizeMap(scope.svg, bounds)
-
-    if data
-      allMappingPropertiesOnMap = deduceAllAvailableMappingOnMap(map, mappingPropertyOnMap)
-      valFn = deduceValueFunction(data, valueProperty, quantizeSteps, allMappingPropertiesOnMap, mappingPropertyOnData, scope.mapId)
-      renderData(scope, data, mappingPropertyOnData, valueProperty, mappingPropertyOnMap, valFn)
-      renderLegend(scope, valFn)
-
-
-
   #    #############################################
   #      Legend Rendering
   #    #############################################

    mappingPropertyOnData: 'id'
    valueProperty: 'value'

  # remove all paths from the svg
  # this is needed since d3 identifies by array index which is overlapping
  # across maps

        .attr('class', (d) -> classFn(d) )


  # Filter out categorical values that are not shown on the map
  filterDataForCategoricalLegend = (mapInstance, valFn) ->
    data = []
    dataUsed = mapInstance.usedDataValues
