Added 'show-collision-boxes' query parameter

This commit is contained in:
orangemug 2018-08-19 17:32:18 +01:00
parent c5ea9494df
commit 70f1f9ffac
2 changed files with 4 additions and 1 deletions

View file

@ -176,7 +176,8 @@ export default class App extends React.Component {
survey: localStorage.hasOwnProperty('survey') ? false : true
},
mapOptions: {
showTileBoundaries: queryUtil.asBool(queryObj, "show-tile-boundaries")
showTileBoundaries: queryUtil.asBool(queryObj, "show-tile-boundaries"),
showCollisionBoxes: queryUtil.asBool(queryObj, "show-collision-boxes")
},
mapFilter: queryObj["color-blindness-emulation"],
}

View file

@ -104,6 +104,7 @@ export default class MapboxGlMap extends React.Component {
}
map.showTileBoundaries = this.props.options.showTileBoundaries;
map.showCollisionBoxes = this.props.options.showCollisionBoxes;
}
componentDidMount() {
@ -117,6 +118,7 @@ export default class MapboxGlMap extends React.Component {
const map = new MapboxGl.Map(mapOpts);
map.showTileBoundaries = mapOpts.showTileBoundaries;
map.showCollisionBoxes = mapOpts.showCollisionBoxes;
const zoom = new ZoomControl;
map.addControl(zoom, 'top-right');