Maps colors improved

This commit is contained in:
vjrj 2018-02-20 13:39:05 +01:00
parent 7df050a2b1
commit 7ce9317876
5 changed files with 14 additions and 9 deletions

View file

@ -36,7 +36,7 @@ class DefMapLayers extends Component {
/>
</BaseLayer>);
const osmlayer = (
<BaseLayer checked={!this.props.gray} name={t('Mapa color de OpenStreetMap')}>
<BaseLayer checked={this.props.osmcolor} name={t('Mapa color de OpenStreetMap')}>
<TileLayer
attribution="&amp;copy <a href=&quot;http://osm.org/copyright&quot;>OpenStreetMap</a> contributors"
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
@ -56,7 +56,7 @@ class DefMapLayers extends Component {
<GoogleLayer googlekey={this.state.gkey} maptype="TERRAIN" />
</BaseLayer> }
{ this.state.gkey &&
<BaseLayer name={t('Mapa de satélite de Google')} checked={!this.props.gray}>
<BaseLayer name={t('Mapa de satélite de Google')} checked={this.props.satellite}>
<GoogleLayer googlekey={this.state.gkey} maptype="SATELLITE" />
</BaseLayer> }
</LayersControl>
@ -66,11 +66,16 @@ class DefMapLayers extends Component {
DefMapLayers.propTypes = {
t: PropTypes.func.isRequired,
gray: PropTypes.bool
gray: PropTypes.bool,
osmcolor: PropTypes.bool,
satellite: PropTypes.bool
};
DefMapLayers.defaultProps = {
gray: true
gray: false,
osmcolor: false,
satellite: false
};
export default translate([], { wait: true })(DefMapLayers);

View file

@ -152,7 +152,7 @@ class SelectionMap extends Component {
subs: this.props.currentSubs
};
if (this.props.action === action.add) {
subsOpts.color = '#F2F2F2';
subsOpts.color = 'gray';
}
this.state.union = subsUnion(this.state.union, subsOpts);
}
@ -183,7 +183,7 @@ class SelectionMap extends Component {
wakeMessageTouch={t('Pulsa para activar')}
sleepOpacity={0.6}
>
<DefMapLayers gray={false} />
<DefMapLayers osmcolor />
{this.props.action === action.edit &&
this.props.currentSubs.map((subs, index) => (
<Marker

View file

@ -117,7 +117,7 @@ class Fire extends React.Component {
nasa={false}
falsePositives
/>
<DefMapLayers gray={false} />
<DefMapLayers satellite />
</Map>
<p>{t('Coordenadas:')} {fire.lat}, {fire.lon}</p>
{(fire.type === 'modis' || fire.type === 'viirs') &&

View file

@ -288,7 +288,7 @@ class FiresMap extends React.Component {
falsePositives={false}
/>
</Fragment> }
<DefMapLayers />
<DefMapLayers gray />
<Control position="topright" >
<ButtonGroup>
<CenterInMyPosition onClick={viewport => this.centerOnUserLocation(viewport)} onlyIcon {... this.props} />

View file

@ -129,7 +129,7 @@ class SubscriptionsMap extends React.Component {
wakeMessageTouch={this.props.t('Pulsa para activar')}
sleepOpacity={0.6}
>
<DefMapLayers />
<DefMapLayers gray />
<Control position="topright" >
<ButtonGroup>
<CenterInMyPosition onClick={viewport => this.centerOnUserLocation(viewport)} onlyIcon {... this.props} />