diff --git a/src/components/ModalSources.jsx b/src/components/ModalSources.jsx index 022c47d..d6c1e78 100644 --- a/src/components/ModalSources.jsx +++ b/src/components/ModalSources.jsx @@ -128,6 +128,7 @@ class AddSource extends React.Component { } case 'geojson_json': return { type: 'geojson', + cluster: source.cluster || false, data: {} } case 'tilejson_vector': return { diff --git a/src/components/ModalSourcesTypeEditor.jsx b/src/components/ModalSourcesTypeEditor.jsx index 4b77f40..ba6ebf1 100644 --- a/src/components/ModalSourcesTypeEditor.jsx +++ b/src/components/ModalSourcesTypeEditor.jsx @@ -8,6 +8,7 @@ import FieldSelect from './FieldSelect' import FieldDynamicArray from './FieldDynamicArray' import FieldArray from './FieldArray' import FieldJson from './FieldJson' +import FieldCheckbox from './FieldCheckbox' class TileJSONSourceEditor extends React.Component { @@ -80,7 +81,7 @@ class TileURLSourceEditor extends React.Component { })} /> {this.props.children} - + } } @@ -205,23 +206,35 @@ class GeoJSONSourceFieldJsonEditor extends React.Component { } render() { - return - { + return
+ + { + this.props.onChange({ + ...this.props.source, + data, + }) + }} + /> + + { this.props.onChange({ ...this.props.source, - data, + cluster: cluster, }) }} /> - +
} }