Merge pull request #363 from orangemug/feature/added-show-collision-boxes

Added 'show-collision-boxes' query parameter
This commit is contained in:
Orange Mug 2018-08-19 19:48:03 +01:00 committed by GitHub
commit 98c235bc21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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');