Upgrade style spec to version used in renderer

This commit is contained in:
Lukas Martinelli 2016-12-19 12:59:04 +01:00
parent 220295442c
commit b088af1586
4 changed files with 4 additions and 5 deletions

View file

@ -23,7 +23,7 @@
"file-saver": "^1.3.2",
"immutable": "^3.8.1",
"mapbox-gl": "^0.28.0",
"mapbox-gl-style-spec": "mapbox/mapbox-gl-style-spec#83b1a3e5837d785af582efd5ed1a212f2df6a4ae",
"mapbox-gl-style-spec": "mapbox/mapbox-gl-style-spec#e85407a377510acb647161de6be6357ab4f606dd",
"ol-mapbox-style": "0.0.11",
"openlayers": "^3.19.1",
"radium": "^0.18.1",

View file

@ -104,7 +104,7 @@ class SpecField extends React.Component {
onChange={this.onValueChanged.bind(this, this.props.fieldName)}
value={this.props.value}
name={label}
allowedValues={this.props.fieldSpec.values}
allowedValues={Object.keys(this.props.fieldSpec.values)}
doc={this.props.fieldSpec.doc}
/>
)

View file

@ -24,7 +24,7 @@ export default class FilterEditor extends React.Component {
const prop = f[1]
const args = f.slice(2)
const availableFilterOperators = GlSpec.filter_operator.values
const availableFilterOperators = Object.keys(GlSpec.filter_operator.values)
const filterOpOptions = availableFilterOperators.map(value => {
return <option value={value}>{value}</option>
})

View file

@ -132,7 +132,6 @@ export class LayerEditor extends React.Component {
visibleIcon = <MdVisibility />
}
console.log(this.props.layer.toJSON())
return <div style={{
padding: theme.scale[0],
}}>
@ -149,7 +148,7 @@ export class LayerEditor extends React.Component {
</NavItem>
</Toolbar>
<FilterEditor
filter={this.props.layer.get('filter').toJSON()}
filter={this.props.layer.get('filter', Immutable.List()).toJSON()}
onFilterChanged={console.log}
/>
{this.props.layer.get('type') !== 'background' && <SourceEditor