mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-29 07:40:28 +01:00
Merge pull request #458 from pathmapper/debug
Add 'show-overdraw-inspector' query parameter
This commit is contained in:
commit
0f0684e701
2 changed files with 5 additions and 2 deletions
|
@ -73,7 +73,7 @@ export default class App extends React.Component {
|
||||||
onLocalStyleChange: mapStyle => this.onStyleChanged(mapStyle, false)
|
onLocalStyleChange: mapStyle => this.onStyleChanged(mapStyle, false)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const shortcuts = [
|
const shortcuts = [
|
||||||
{
|
{
|
||||||
key: "?",
|
key: "?",
|
||||||
|
@ -187,7 +187,8 @@ export default class App extends React.Component {
|
||||||
},
|
},
|
||||||
mapOptions: {
|
mapOptions: {
|
||||||
showTileBoundaries: queryUtil.asBool(queryObj, "show-tile-boundaries"),
|
showTileBoundaries: queryUtil.asBool(queryObj, "show-tile-boundaries"),
|
||||||
showCollisionBoxes: queryUtil.asBool(queryObj, "show-collision-boxes")
|
showCollisionBoxes: queryUtil.asBool(queryObj, "show-collision-boxes"),
|
||||||
|
showOverdrawInspector: queryUtil.asBool(queryObj, "show-overdraw-inspector")
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -114,6 +114,7 @@ export default class MapboxGlMap extends React.Component {
|
||||||
if (map) {
|
if (map) {
|
||||||
map.showTileBoundaries = this.props.options.showTileBoundaries;
|
map.showTileBoundaries = this.props.options.showTileBoundaries;
|
||||||
map.showCollisionBoxes = this.props.options.showCollisionBoxes;
|
map.showCollisionBoxes = this.props.options.showCollisionBoxes;
|
||||||
|
map.showOverdrawInspector = this.props.options.showOverdrawInspector;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,6 +132,7 @@ export default class MapboxGlMap extends React.Component {
|
||||||
|
|
||||||
map.showTileBoundaries = mapOpts.showTileBoundaries;
|
map.showTileBoundaries = mapOpts.showTileBoundaries;
|
||||||
map.showCollisionBoxes = mapOpts.showCollisionBoxes;
|
map.showCollisionBoxes = mapOpts.showCollisionBoxes;
|
||||||
|
map.showOverdrawInspector = mapOpts.showOverdrawInspector;
|
||||||
|
|
||||||
const zoom = new ZoomControl;
|
const zoom = new ZoomControl;
|
||||||
map.addControl(zoom, 'top-right');
|
map.addControl(zoom, 'top-right');
|
||||||
|
|
Loading…
Reference in a new issue