aboutsummaryrefslogtreecommitdiff
path: root/modern/src
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src')
-rw-r--r--modern/src/MainMap.js16
-rw-r--r--modern/src/MainToolbar.js4
2 files changed, 15 insertions, 5 deletions
diff --git a/modern/src/MainMap.js b/modern/src/MainMap.js
index 8b363c9..ff51b56 100644
--- a/modern/src/MainMap.js
+++ b/modern/src/MainMap.js
@@ -4,6 +4,8 @@ import { connect } from 'react-redux';
import { Map, View } from 'ol';
import { fromLonLat } from 'ol/proj';
import olms from 'ol-mapbox-style';
+import TileLayer from 'ol/layer/Tile';
+import OSM from 'ol/source/OSM';
const mapStateToProps = state => ({
positions: state.positions
@@ -15,11 +17,19 @@ class MainMap extends Component {
target: this.el,
view: new View({
constrainResolution: true,
- center: fromLonLat([14.5, 46.05]),
- zoom: 3
+ center: fromLonLat([25.65, 60.98]),
+ zoom: 9
})
});
- olms(this.map, 'https://cdn.traccar.com/map/basic.json');
+ if (location.hostname === 'localhost') {
+ olms(this.map, 'https://cdn.traccar.com/map/basic.json');
+ } else {
+ this.map.addLayer(
+ new TileLayer({
+ source: new OSM()
+ })
+ );
+ }
}
render() {
diff --git a/modern/src/MainToolbar.js b/modern/src/MainToolbar.js
index c5af9d8..6e2e4d6 100644
--- a/modern/src/MainToolbar.js
+++ b/modern/src/MainToolbar.js
@@ -97,7 +97,7 @@ class MainToobar extends Component {
</ListItemIcon>
<ListItemText primary="Dashboard" />
</ListItem>
- <ListItem button>
+ <ListItem button disabled>
<ListItemIcon>
<BarChartIcon />
</ListItemIcon>
@@ -106,7 +106,7 @@ class MainToobar extends Component {
</List>
<Divider />
<List>
- <ListItem button>
+ <ListItem button disabled>
<ListItemIcon>
<SettingsIcon />
</ListItemIcon>