From 59ad91fdf84619e9ef208f12423ebeda8e61f6dd Mon Sep 17 00:00:00 2001 From: pathmapper Date: Fri, 2 Nov 2018 09:07:01 +0100 Subject: [PATCH] Add 'show-overdraw-inspector' query parameter --- src/components/App.jsx | 5 +++-- src/components/map/MapboxGlMap.jsx | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/App.jsx b/src/components/App.jsx index b043f1c..6fc5ce9 100644 --- a/src/components/App.jsx +++ b/src/components/App.jsx @@ -73,7 +73,7 @@ export default class App extends React.Component { onLocalStyleChange: mapStyle => this.onStyleChanged(mapStyle, false) }) - + const shortcuts = [ { key: "?", @@ -187,7 +187,8 @@ export default class App extends React.Component { }, mapOptions: { 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") }, } diff --git a/src/components/map/MapboxGlMap.jsx b/src/components/map/MapboxGlMap.jsx index 6236243..dd4885f 100644 --- a/src/components/map/MapboxGlMap.jsx +++ b/src/components/map/MapboxGlMap.jsx @@ -114,6 +114,7 @@ export default class MapboxGlMap extends React.Component { if (map) { map.showTileBoundaries = this.props.options.showTileBoundaries; 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.showCollisionBoxes = mapOpts.showCollisionBoxes; + map.showOverdrawInspector = mapOpts.showOverdrawInspector; const zoom = new ZoomControl; map.addControl(zoom, 'top-right');