Skip to content

Commit f1b7af4

Browse files
committed
set default map maxzoom level (19) and adjusted other default values
1 parent 2a1f94a commit f1b7af4

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

assets/javascripts/app.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ var App = (function ($, publ) {
3535

3636
// Quick hack
3737
var quick_hack = {
38-
lon: 135.1955,
39-
lat: 34.6901,
38+
lon: 139.691706,
39+
lat: 35.689524,
4040
zoom: 13,
41-
maxzoom: 18
41+
maxzoom: 19
4242
};
4343

4444
/**
@@ -170,7 +170,7 @@ var App = (function ($, publ) {
170170
toolbar.setPosition("bottom-left");
171171
map.addControl(toolbar);
172172

173-
// this.setView();
173+
this.setView();
174174
this.setGeolocation();
175175
this.setGeocoding();
176176
this.parseHistory();
@@ -431,7 +431,6 @@ var App = (function ($, publ) {
431431
ol.extent.extend(extent, feature.getGeometry().getExtent());
432432
});
433433
maps.forEach(function (m) {
434-
m.getView().setMaxZoom(18);
435434
m.getView().fit(extent, m.getSize());
436435
});
437436
}

init.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
settings(
1919
:default => {
20-
'map_center_longitude' => 139.691706,
21-
'map_center_latitude' => 35.689524,
22-
'map_zoom_level' => 8,
23-
'map_maxzoom_level' => 18
20+
'default_map_center_longitude' => 139.691706,
21+
'default_map_center_latitude' => 35.689524,
22+
'default_map_zoom_level' => 13,
23+
'default_map_maxzoom_level' => 19
2424
},
2525
partial: 'settings/gtt/settings'
2626
)

lib/redmine_gtt/hooks/view_layouts_base_html_head_hook.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def view_layouts_base_body_bottom(context={})
4747
:maxzoom => Setting.plugin_redmine_gtt['default_map_maxzoom_level'],
4848
:geocoder_url => Setting.plugin_redmine_gtt['default_geocoder_url'],
4949
:geocoder_apikey => Setting.plugin_redmine_gtt['default_geocoder_apikey'],
50-
:plugin_settings => Setting.plugin_redmine_gtt
50+
:plugin_settings => Setting.plugin_redmine_gtt.select{ |key, value| key.to_s.match(/^(?!default).+/) }
5151
}, :id => 'ol-defaults', :style => 'display:none')
5252
return tags.join("\n")
5353
end

0 commit comments

Comments
 (0)