1 <div class="base-layers d-grid gap-3 p-3 border-bottom border-secondary-subtle">
2 <% MapLayers.full_definitions("config/layers.yml").each do |layer| %>
3 <div class="position-relative">
4 <div class="position-absolute top-0 start-0 bottom-0 end-0 z-0 bg-body-secondary" data-layer="<%= layer["layerId"] %>"></div>
5 <input type="radio" class="btn-check" name="layer" id="map-ui-layer-<%= layer["layerId"] %>"></input>
6 <label class="btn btn-outline-primary border-4 rounded-3 bg-transparent position-absolute p-0 h-100 w-100 overflow-hidden" for="map-ui-layer-<%= layer["layerId"] %>">
7 <span class="badge position-absolute top-0 start-0 rounded-top-0 rounded-start-0 py-1 px-2 bg-body bg-opacity-75 text-body text-wrap text-start fs-6 lh-base">
8 <%= t "javascripts.map.base.#{layer['nameId']}" %>
14 <% if Settings.status != "api_offline" && Settings.status != "database_offline" %>
15 <div class="overlay-layers p-3">
16 <p class="text-body-secondary small mb-2"><%= t "javascripts.map.layers.overlays" %></p>
17 <% [{ :layer_id => "noteLayer", :name => "notes", :max_area => Settings.max_note_request_area },
18 { :layer_id => "dataLayer", :name => "data", :max_area => Settings.max_request_area },
19 { :layer_id => "gpsLayer", :name => "gps" }].each do |layer|
20 options = { :data => layer, :class => "form-check" }
21 options[:title] = t(".map_#{layer[:name]}_zoom_in_tooltip") if layer[:max_area] %>
22 <%= tag.div(**options) do %>
23 <label id="<%= "label-layers-#{layer[:name]}" %>" class="form-check-label">
24 <input type="checkbox" class="form-check-input">
25 <%= t "javascripts.map.layers.#{layer[:name]}" %>