this.container = x}
- style={{
- width: "100%",
- height: "100%",
- backgroundColor: '#fff',
- ...this.props.style,
- }}>
+ return
+
this.popupContainer = x}
+ style={{background: "black"}}
+ className="maputnik-popup"
+ >
+
+
+
+
+ Zoom level: {this.state.zoom}
+
+ {this.props.debugToolbox &&
+
+
+
+ {renderCoords(this.state.cursor)}
+
+
+
+ {renderCoords(this.state.center)}
+
+
+
+ {this.state.rotation}
+
+
+ }
+
this.container = x}
+ style={{
+ ...this.props.style,
+ }}>
+
}
}
diff --git a/src/components/modals/DebugModal.js b/src/components/modals/DebugModal.js
index bddb48f3..91bf47c7 100644
--- a/src/components/modals/DebugModal.js
+++ b/src/components/modals/DebugModal.js
@@ -9,8 +9,10 @@ class DebugModal extends React.Component {
isOpen: PropTypes.bool.isRequired,
renderer: PropTypes.string.isRequired,
onChangeMaboxGlDebug: PropTypes.func.isRequired,
+ onChangeOpenlayersDebug: PropTypes.func.isRequired,
onOpenToggle: PropTypes.func.isRequired,
mapboxGlDebugOptions: PropTypes.object,
+ openlayersDebugOptions: PropTypes.object,
}
render() {
@@ -33,9 +35,15 @@ class DebugModal extends React.Component {
}
{this.props.renderer === 'ol' &&
-
- No debug options available for the OpenLayers renderer
-
+
}
diff --git a/src/components/modals/SettingsModal.jsx b/src/components/modals/SettingsModal.jsx
index 6d38b2dc..04ca51d1 100644
--- a/src/components/modals/SettingsModal.jsx
+++ b/src/components/modals/SettingsModal.jsx
@@ -11,6 +11,7 @@ class SettingsModal extends React.Component {
static propTypes = {
mapStyle: PropTypes.object.isRequired,
onStyleChanged: PropTypes.func.isRequired,
+ onChangeMetadataProperty: PropTypes.func.isRequired,
isOpen: PropTypes.bool.isRequired,
onOpenToggle: PropTypes.func.isRequired,
}
@@ -23,19 +24,9 @@ class SettingsModal extends React.Component {
this.props.onStyleChanged(changedStyle)
}
- changeMetadataProperty(property, value) {
- const changedStyle = {
- ...this.props.mapStyle,
- metadata: {
- ...this.props.mapStyle.metadata,
- [property]: value
- }
- }
- this.props.onStyleChanged(changedStyle)
- }
-
render() {
const metadata = this.props.mapStyle.metadata || {}
+ const {onChangeMetadataProperty} = this.props;
const inputProps = { }
return