Skip to content

Commit e602f34

Browse files
committed
Adds default layers to map config
1 parent 196c7df commit e602f34

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

app/views/users/form/_map.html.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
<% if @project.nil? or @project.module_enabled?(:gtt) %>
12
<fieldset class="box tabular">
23
<legend><%= l(:label_user_map) %></legend>
34
<%= f.hidden_field(:geom, :value => @user.geojson, :id => 'geom') %>
45

56
<%= content_tag(:div, "", :data => {
67
:geom => @user.geojson,
8+
:layers => GttTileSource.default,
79
:edit => 'Point'
810
}, :id => 'ol-' + rand(36**8).to_s(36), :class => 'ol-map')
911
%>
1012
</fieldset>
13+
<% end %>

app/views/users/show/_map.html.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
<% if @project.nil? or @project.module_enabled?(:gtt) %>
12
<h3><%= l(:label_user_map) %></h3>
23

34
<%= content_tag(:div, "",:data => {
45
:geom => @user.geojson,
6+
:layers => GttTileSource.default
57
}, :id => 'ol-' + rand(36**8).to_s(36), :class => 'ol-map')
68
%>
9+
<% end %>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<% if @project.nil? or @project.module_enabled?(:gtt) %>
12
<% other_formats_links do |f| %>
23
<%= f.link_to 'GeoJSON', :url => params.merge({:format => 'geojson'}) %>
34
<% end %>
5+
<% end %>

0 commit comments

Comments
 (0)