@@ -91,6 +91,12 @@ export class Debug extends Component<{ map: maplibregl.Map }, DebugState> {
9191 this . renderWMTS ( ) ;
9292 }
9393
94+ /** Show the source bounding box ont he map */
95+ toggleTileBoundary : ChangeEventHandler = ( e ) => {
96+ const target = e . target as HTMLInputElement ;
97+ Config . map . setDebug ( 'debug.tile' , target . checked ) ;
98+ } ;
99+
94100 /** Show the source bounding box ont he map */
95101 toggleCogs : ChangeEventHandler = ( e ) => {
96102 const target = e . target as HTMLInputElement ;
@@ -153,6 +159,7 @@ export class Debug extends Component<{ map: maplibregl.Map }, DebugState> {
153159 { this . renderPurple ( ) }
154160 { this . renderCogToggle ( ) }
155161 { this . renderSourceToggle ( ) }
162+ { this . renderTileToggle ( ) }
156163 </ div >
157164 ) ;
158165 }
@@ -216,6 +223,15 @@ export class Debug extends Component<{ map: maplibregl.Map }, DebugState> {
216223 ) ;
217224 }
218225
226+ renderTileToggle ( ) : ReactNode {
227+ return (
228+ < div className = "debug__info" >
229+ < label className = "debug__label" > Tile Boundaries</ label >
230+ < input type = "checkbox" onChange = { this . toggleTileBoundary } checked = { Config . map . debug [ 'debug.tile' ] } />
231+ </ div >
232+ ) ;
233+ }
234+
219235 downloadSource = async ( ) : Promise < void > => {
220236 const im = this . state . imagery ;
221237 if ( im == null ) return ;
@@ -338,6 +354,8 @@ export class Debug extends Component<{ map: maplibregl.Map }, DebugState> {
338354 setVectorShown ( isShown : boolean , type : 'source' | 'cog' ) : void {
339355 const map = this . props . map ;
340356
357+ map . showTileBoundaries = Config . map . debug [ 'debug.tile' ] ;
358+
341359 const layerId = Config . map . layerId ;
342360 const sourceId = `${ layerId } _${ type } ` ;
343361 const layerFillId = `${ sourceId } _fill` ;
0 commit comments