Skip to content

Commit f69d791

Browse files
authored
Merge pull request #184 from gtt-project/fix/styling
Map improvements
2 parents 767a949 + 4df2544 commit f69d791

File tree

2 files changed

+48
-7
lines changed

2 files changed

+48
-7
lines changed

src/components/gtt-client.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
Select,
1818
} from 'ol/interaction'
1919
import { focus as events_condifition_focus } from 'ol/events/condition'
20-
import { defaults as control_defaults } from 'ol/control'
20+
import { defaults as control_defaults, FullScreen, Rotate } from 'ol/control'
2121
import { transform, fromLonLat, transformExtent } from 'ol/proj'
2222
import { createEmpty, extend, getCenter, containsCoordinate } from 'ol/extent'
2323
import { FeatureCollection } from 'geojson'
@@ -306,10 +306,13 @@ export class GttClient {
306306
this.toolbar.setPosition('bottom-left' as position)
307307
this.map.addControl(this.toolbar)
308308
this.setView()
309-
this.setGeolocation(this.map)
310309
this.setGeocoding(this.map)
310+
this.setGeolocation(this.map)
311311
this.parseHistory()
312312

313+
this.map.addControl (new FullScreen())
314+
this.map.addControl (new Rotate())
315+
313316
// Control button
314317
const maximizeCtrl = new Button({
315318
html: '<i class="material-icons" >zoom_out_map</i>',

src/stylesheets/app.scss

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,53 @@
33
*/
44
.ol-map {
55
width: 100%;
6-
height: 300px;
6+
height: 400px;
77
border: 1px solid #E4E4E4;
88
}
99
#issue-form .ol-map {
10-
width: 92%;
11-
margin: 1em auto;
10+
width: 100%;
11+
margin-bottom: 1em;
12+
}
13+
14+
$breakpoint-tablet: 899px;
15+
@media (max-width: $breakpoint-tablet) {
16+
.ol-map {
17+
height: 340px;
18+
}
1219
}
1320

1421
.ol-control button {
15-
background-color: rgba(40, 40, 40, 0.8);
22+
background-color: rgba(52, 73, 94, 0.8);
23+
height: 32px;
24+
width: 32px;
1625
}
1726
.ol-control button:hover {
18-
background-color: rgba(40, 40, 40, 1);
27+
background-color: rgba(52, 73, 94, 1);
28+
}
29+
30+
.ol-zoom button.ol-zoom-in,
31+
.ol-zoom button.ol-zoom-out,
32+
.ol-full-screen button.ol-full-screen-true,
33+
.ol-full-screen button.ol-full-screen-false,
34+
.ol-rotate button.ol-rotate-reset,
35+
.ol-bar .ol-button button {
36+
font-size: 1.6em;
37+
}
38+
39+
div.ol-full-screen {
40+
right: 3.0em;
41+
}
42+
43+
div.ol-rotate {
44+
right: 5.5em;
45+
}
46+
47+
div.ol-full-screen {
48+
right: 3.0em;
49+
}
50+
51+
.ol-control.ol-bar.ol-top.ol-left, .ol-control.ol-bar.ol-top.ol-right {
52+
top: 5.2em;
1953
}
2054

2155
.tabular .ol-layerswitcher label {
@@ -43,6 +77,10 @@ i[id^='icon_settings_tracker_'] {
4377
text-align: center;
4478
}
4579

80+
.ol-control.ol-layerswitcher-popup {
81+
top: 0.5em;
82+
}
83+
4684
.ol-control button .material-icons {
4785
font-size: inherit;
4886
}

0 commit comments

Comments
 (0)