import React from 'react' import { Trans, WithTranslation, withTranslation } from 'react-i18next'; import Modal from './Modal' type ModalDebugInternalProps = { isOpen: boolean renderer: string onChangeMaplibreGlDebug(key: string, checked: boolean): unknown onChangeOpenlayersDebug(key: string, checked: boolean): unknown onOpenToggle(value: boolean): unknown maplibreGlDebugOptions?: object openlayersDebugOptions?: object mapView: { zoom: number center: { lng: number lat: number } } } & WithTranslation; class ModalDebugInternal extends React.Component { render() { const {t, mapView} = this.props; const osmZoom = Math.round(mapView.zoom)+1; const osmLon = +(mapView.center.lng).toFixed(5); const osmLat = +(mapView.center.lat).toFixed(5); return

{t("Options")}

{this.props.renderer === 'mlgljs' &&
    {Object.entries(this.props.maplibreGlDebugOptions!).map(([key, val]) => { return
  • })}
} {this.props.renderer === 'ol' &&
    {Object.entries(this.props.openlayersDebugOptions!).map(([key, val]) => { return
  • })}
}

Links

Open in OSM — Opens the current view on openstreetmap.org

} } const ModalDebug = withTranslation()(ModalDebugInternal); export default ModalDebug;