aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/maps/openlayers.html
blob: f4c78767c5bda8bba6bfb2748a6199a415feb7bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
[% IF map.clickable %]
    [% map.img_type = 'input type="image"' %]
[% ELSE %]
    [% map.img_type = 'img' %]
[% END %]

<input type="hidden" name="zoom" value="[% map.zoom %]">
<div id="js-map-data"
[%- IF c.config.STAGING_SITE %]
    data-staging=1
[%- END %]
[%- UNLESS c.cobrand.call_hook('hide_areas_on_reports') %]
    data-area="[% map.area.join(',') %]"
[%- END %]
    data-latitude=[% map.latitude %]
    data-longitude=[% map.longitude %]
[% IF map.zoomToBounds -%]
    data-zoomToBounds=1
[%- END %]
[% IF map.zoom -%]
    data-zoom=[% map.zoom %]
[%- END %]
    data-pin_prefix='[% c.config.ADMIN_BASE_URL IF admin %][% c.cobrand.path_to_pin_icons %]'
    data-pin_new_report_colour='[% c.cobrand.pin_new_report_colour %]'
    data-numZoomLevels=[% map.numZoomLevels %]
    data-zoomOffset=[% map.zoomOffset %]
    data-map_type="[% map.map_type %]"
[% IF include_key -%]
    data-key='[% c.config.BING_MAPS_API_KEY %]'
[%- END -%]
[% IF list_of_names_as_string -%]
    data-bodies='[% list_of_names_as_string | html %]'
[%- END -%]
>
</div>
<div id="map_box" aria-hidden="true">
    [% pre_map %]
    <div id="map">
      [% IF noscript_map_template == 'maps/noscript_map_base_wmx.html' %]
          [% INCLUDE 'maps/noscript_map_base_wmx.html' js = 1 %]
      [% ELSE %]
          [% INCLUDE 'maps/noscript_map.html' js = 1 %]
      [% END %]
    </div>
    [% IF map.copyright %]
    <div class="olControlAttribution" style="position: absolute;">[% map.copyright | safe %]</div>
    [% END %]
    <img id="loading-indicator" class="hidden" aria-hidden="true" src="/i/loading.svg" alt="Loading...">