Some more openlayers improvments as well as initial work for projection support

This commit is contained in:
orangemug
2019-05-29 17:37:55 +01:00
parent c1cab38c7a
commit efe42021f1
9 changed files with 267 additions and 26 deletions
+10 -3
View File
@@ -11,6 +11,7 @@ class DebugModal extends React.Component {
onChangeMaboxGlDebug: PropTypes.func.isRequired,
onOpenToggle: PropTypes.func.isRequired,
mapboxGlDebugOptions: PropTypes.object,
openlayersDebugOptions: PropTypes.object,
}
render() {
@@ -33,9 +34,15 @@ class DebugModal extends React.Component {
</ul>
}
{this.props.renderer === 'ol' &&
<div>
No debug options available for the OpenLayers renderer
</div>
<ul>
{Object.entries(this.props.openlayersDebugOptions).map(([key, val]) => {
return <li key={key}>
<label>
<input type="checkbox" checked={val} onClick={(e) => this.props.onChangeOpenlayersDebug(key, e.target.checked)} /> {key}
</label>
</li>
})}
</ul>
}
</div>
</Modal>
+15
View File
@@ -109,6 +109,21 @@ class SettingsModal extends React.Component {
onChange={this.changeMetadataProperty.bind(this, 'maputnik:renderer')}
/>
</InputBlock>
{this.props.openlayersDebugOptions.enableProjections &&
<InputBlock label={"Projection (experimental)"} doc={"Projection of the data"}>
<SelectInput {...inputProps}
data-wd-key="modal-settings.maputnik:projection"
options={[
['EPSG:3857', '[EPSG:3857] Web Mercator'],
['EPSG:3031', '[EPSG:3031] Antarctic Polar Stereographic (experimental)'],
]}
value={metadata['maputnik:projection'] || 'EPSG:3857'}
onChange={this.changeMetadataProperty.bind(this, 'maputnik:projection')}
/>
</InputBlock>
}
</div>
</Modal>
}