mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-27 16:18:02 +01:00
Remove unused colorize funcs
This commit is contained in:
parent
f6b8bbe5a6
commit
190750cc99
1 changed files with 0 additions and 14 deletions
14
src/style.js
14
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,
|
||||
|
|
Loading…
Reference in a new issue