mirror of
https://github.com/maputnik/editor.git
synced 2026-08-25 14:37:27 +00:00
Fix minzoom and maxzoom in source modal
This commit is contained in:
@@ -144,8 +144,8 @@ class AddSource extends React.Component {
|
|||||||
case 'tilexyz_vector': return {
|
case 'tilexyz_vector': return {
|
||||||
type: 'vector',
|
type: 'vector',
|
||||||
tiles: source.tiles || ['http://localhost:3000/{x}/{y}/{z}.pbf'],
|
tiles: source.tiles || ['http://localhost:3000/{x}/{y}/{z}.pbf'],
|
||||||
minZoom: source.minZoom || 0,
|
minZoom: source.minzoom || 0,
|
||||||
maxZoom: source.maxZoom || 14
|
maxZoom: source.maxzoom || 14
|
||||||
}
|
}
|
||||||
case 'tilejson_raster': return {
|
case 'tilejson_raster': return {
|
||||||
type: 'raster',
|
type: 'raster',
|
||||||
@@ -154,8 +154,8 @@ class AddSource extends React.Component {
|
|||||||
case 'tilexyz_raster': return {
|
case 'tilexyz_raster': return {
|
||||||
type: 'raster',
|
type: 'raster',
|
||||||
tiles: source.tiles || ['http://localhost:3000/{x}/{y}/{z}.pbf'],
|
tiles: source.tiles || ['http://localhost:3000/{x}/{y}/{z}.pbf'],
|
||||||
minZoom: source.minZoom || 0,
|
minzoom: source.minzoom || 0,
|
||||||
maxZoom: source.maxZoom || 14
|
maxzoom: source.maxzoom || 14
|
||||||
}
|
}
|
||||||
default: return {}
|
default: return {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,19 +46,19 @@ class TileURLSourceEditor extends React.Component {
|
|||||||
{this.renderTileUrls()}
|
{this.renderTileUrls()}
|
||||||
<InputBlock label={"Min Zoom"} doc={GlSpec.source_tile.minzoom.doc}>
|
<InputBlock label={"Min Zoom"} doc={GlSpec.source_tile.minzoom.doc}>
|
||||||
<NumberInput
|
<NumberInput
|
||||||
value={this.props.source.minZoom}
|
value={this.props.source.minzoom || 0}
|
||||||
onChange={minZoom => this.props.onChange({
|
onChange={minzoom => this.props.onChange({
|
||||||
...this.props.source,
|
...this.props.source,
|
||||||
minZoom: minZoom
|
minzoom: minzoom
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
</InputBlock>
|
</InputBlock>
|
||||||
<InputBlock label={"Max Zoom"} doc={GlSpec.source_tile.maxzoom.doc}>
|
<InputBlock label={"Max Zoom"} doc={GlSpec.source_tile.maxzoom.doc}>
|
||||||
<NumberInput
|
<NumberInput
|
||||||
value={this.props.source.maxZoom}
|
value={this.props.source.maxzoom || 22}
|
||||||
onChange={maxZoom => this.props.onChange({
|
onChange={maxzoom => this.props.onChange({
|
||||||
...this.props.source,
|
...this.props.source,
|
||||||
maxZoom: maxZoom
|
maxzoom: maxzoom
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
</InputBlock>
|
</InputBlock>
|
||||||
|
|||||||
Reference in New Issue
Block a user