diff --git a/src/components/modals/SourcesModal.jsx b/src/components/modals/SourcesModal.jsx index b13e9795..0a0032b1 100644 --- a/src/components/modals/SourcesModal.jsx +++ b/src/components/modals/SourcesModal.jsx @@ -130,16 +130,26 @@ class AddSource extends React.Component { type: 'geojson', data: source.data || 'http://localhost:3000/geojson.json' } - case 'tilejson': return { + case 'tilejson_vector': return { type: 'vector', url: source.url || 'http://localhost:3000/tilejson.json' } - case 'tilexyz': return { + case 'tilexyz_vector': return { type: 'vector', tiles: source.tiles || ['http://localhost:3000/{x}/{y}/{z}.pbf'], minZoom: source.minZoom || 0, maxZoom: source.maxZoom || 14 } + case 'tilejson_raster': return { + type: 'raster', + url: source.url || 'http://localhost:3000/tilejson.json' + } + case 'tilexyz_raster': return { + type: 'raster', + tiles: source.tiles || ['http://localhost:3000/{x}/{y}/{z}.pbf'], + minZoom: source.minZoom || 0, + maxZoom: source.maxZoom || 14 + } default: return {} } } @@ -162,8 +172,10 @@ class AddSource extends React.Component { this.setState({mode: mode, source: this.defaultSource(mode)})} value={this.state.mode} diff --git a/src/components/sources/SourceTypeEditor.jsx b/src/components/sources/SourceTypeEditor.jsx index a7554501..5dcdbf71 100644 --- a/src/components/sources/SourceTypeEditor.jsx +++ b/src/components/sources/SourceTypeEditor.jsx @@ -99,8 +99,10 @@ class SourceTypeEditor extends React.Component { } switch(this.props.mode) { case 'geojson': return - case 'tilejson': return - case 'tilexyz': return + case 'tilejson_vector': return + case 'tilexyz_vector': return + case 'tilejson_raster': return + case 'tilexyz_raster': return default: return null } }