Remove unused colorize funcs

This commit is contained in:
Lukas Martinelli 2016-12-19 11:34:01 +01:00
parent f6b8bbe5a6
commit 190750cc99

View file

@ -2,7 +2,6 @@ import React from 'react';
import Immutable from 'immutable' import Immutable from 'immutable'
import spec from 'mapbox-gl-style-spec/reference/latest.min.js' import spec from 'mapbox-gl-style-spec/reference/latest.min.js'
import diffJSONStyles from 'mapbox-gl-style-spec/lib/diff' import diffJSONStyles from 'mapbox-gl-style-spec/lib/diff'
import randomColor from 'randomcolor'
// Standard JSON to Immutable conversion except layers // Standard JSON to Immutable conversion except layers
// are stored in an OrderedMap to make lookups id fast // are stored in an OrderedMap to make lookups id fast
@ -70,20 +69,7 @@ function toJSON(mapStyle) {
return jsonStyle 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 { export default {
colorizeLayers,
toJSON, toJSON,
fromJSON, fromJSON,
diffStyles, diffStyles,