From 190750cc99f7d459acaa648bf7d3607bb94edd19 Mon Sep 17 00:00:00 2001 From: Lukas Martinelli Date: Mon, 19 Dec 2016 11:34:01 +0100 Subject: [PATCH] Remove unused colorize funcs --- src/style.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/style.js b/src/style.js index ab9e213..a47e471 100644 --- a/src/style.js +++ b/src/style.js @@ -2,7 +2,6 @@ import React from 'react'; import Immutable from 'immutable' import spec from 'mapbox-gl-style-spec/reference/latest.min.js' import diffJSONStyles from 'mapbox-gl-style-spec/lib/diff' -import randomColor from 'randomcolor' // Standard JSON to Immutable conversion except layers // are stored in an OrderedMap to make lookups id fast @@ -70,20 +69,7 @@ function toJSON(mapStyle) { return jsonStyle } -export function colorizeLayers(layers) { - return layers.map(layer => { - if(!layer.metadata) { - layer.metadata = {} - } - if(!"maputnik:color" in layer.metadata) { - layer.metadata["maputnik:color"] = randomColor() - } - return layer - }) -} - export default { - colorizeLayers, toJSON, fromJSON, diffStyles,