mirror of
https://github.com/maputnik/editor.git
synced 2026-06-14 19:27:25 +00:00
Some more openlayers improvments as well as initial work for projection support
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user