mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-14 20:23:27 +01:00
Fix minzoom and maxzoom in source modal
This commit is contained in:
parent
43d9440e05
commit
40111e0d8e
2 changed files with 10 additions and 10 deletions
|
@ -144,8 +144,8 @@ class AddSource extends React.Component {
|
|||
case 'tilexyz_vector': return {
|
||||
type: 'vector',
|
||||
tiles: source.tiles || ['http://localhost:3000/{x}/{y}/{z}.pbf'],
|
||||
minZoom: source.minZoom || 0,
|
||||
maxZoom: source.maxZoom || 14
|
||||
minZoom: source.minzoom || 0,
|
||||
maxZoom: source.maxzoom || 14
|
||||
}
|
||||
case 'tilejson_raster': return {
|
||||
type: 'raster',
|
||||
|
@ -154,8 +154,8 @@ class AddSource extends React.Component {
|
|||
case 'tilexyz_raster': return {
|
||||
type: 'raster',
|
||||
tiles: source.tiles || ['http://localhost:3000/{x}/{y}/{z}.pbf'],
|
||||
minZoom: source.minZoom || 0,
|
||||
maxZoom: source.maxZoom || 14
|
||||
minzoom: source.minzoom || 0,
|
||||
maxzoom: source.maxzoom || 14
|
||||
}
|
||||
default: return {}
|
||||
}
|
||||
|
|
|
@ -46,19 +46,19 @@ class TileURLSourceEditor extends React.Component {
|
|||
{this.renderTileUrls()}
|
||||
<InputBlock label={"Min Zoom"} doc={GlSpec.source_tile.minzoom.doc}>
|
||||
<NumberInput
|
||||
value={this.props.source.minZoom}
|
||||
onChange={minZoom => this.props.onChange({
|
||||
value={this.props.source.minzoom || 0}
|
||||
onChange={minzoom => this.props.onChange({
|
||||
...this.props.source,
|
||||
minZoom: minZoom
|
||||
minzoom: minzoom
|
||||
})}
|
||||
/>
|
||||
</InputBlock>
|
||||
<InputBlock label={"Max Zoom"} doc={GlSpec.source_tile.maxzoom.doc}>
|
||||
<NumberInput
|
||||
value={this.props.source.maxZoom}
|
||||
onChange={maxZoom => this.props.onChange({
|
||||
value={this.props.source.maxzoom || 22}
|
||||
onChange={maxzoom => this.props.onChange({
|
||||
...this.props.source,
|
||||
maxZoom: maxZoom
|
||||
maxzoom: maxzoom
|
||||
})}
|
||||
/>
|
||||
</InputBlock>
|
||||
|
|
Loading…
Reference in a new issue