29
29
this.zoom_unav = true;
30
30
this.map_stretched = true;
34
32
this.marker_pos = new ol.Overlay({
35
33
positioning: 'center-center',
36
34
element: document.getElementById('marker_pos')
126
124
return this.center_onpos;
129
UI.prototype.set_map_layer = function(value) {
130
this.map_layer = value;
132
this.map.getLayers().getArray()[0].setVisible(true); // Online
133
this.map.getLayers().getArray()[1].setVisible(false); // Offline
134
$('#map_attribution').show();
135
$(".map").removeClass('body_bg');
138
this.map.getLayers().getArray()[0].setVisible(false); // Online
139
this.map.getLayers().getArray()[1].setVisible(true); // Offline
140
$('#map_attribution').hide();
141
$(".map").addClass('body_bg');
145
UI.prototype.get_map_layer = function() {
146
return this.map_layer;
127
UI.prototype.set_map_layer = function(layer) {
130
this.map.getLayers().getArray()[0].setVisible(true); // Online terrain
131
this.map.getLayers().getArray()[1].setVisible(false); // Online OSM
132
this.map.getLayers().getArray()[2].setVisible(false); // Offline
133
$('#map_attribution').html("<span onclick=\"qml_go_url('https://mapzen.com')\">© Mapzen</span> <span onclick=\"qml_go_url('http://stamen.com')\">© Stamen</span> <span onclick=\"qml_go_url('http://www.openstreetmap.org/copyright')\">© OpenStreetMap contributors</span>");
134
$('#map_attribution').show();
135
$(".map").removeClass('body_bg');
138
this.map.getLayers().getArray()[0].setVisible(false); // Online terrain
139
this.map.getLayers().getArray()[1].setVisible(true); // Online OSM
140
this.map.getLayers().getArray()[2].setVisible(false); // Offline
141
$('#map_attribution').html("<span onclick=\"qml_go_url('https://mapzen.com')\">© Mapzen</span> <span onclick=\"qml_go_url('http://www.openstreetmap.org/copyright')\">© OpenStreetMap contributors</span>");
142
$('#map_attribution').show();
143
$(".map").removeClass('body_bg');
146
this.map.getLayers().getArray()[0].setVisible(false); // Online terrain
147
this.map.getLayers().getArray()[1].setVisible(false); // Online OSM
148
this.map.getLayers().getArray()[2].setVisible(true); // Offline
149
$('#map_attribution').show();
150
$(".map").addClass('body_bg');
149
155
UI.prototype.set_center_1st_pos = function(status) {