Projet

Général

Profil

0001-maps-add-possibility-to-have-a-map-without-geolocati.patch

Frédéric Péters, 15 juin 2018 11:34

Télécharger (1,75 ko)

Voir les différences:

Subject: [PATCH] maps: add possibility to have a map without geolocation
 button (#24571)

 combo/apps/maps/static/js/combo.map.js       | 2 +-
 combo/apps/maps/templates/maps/map_cell.html | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
combo/apps/maps/static/js/combo.map.js
104 104
        if (map_options.maxZoom != map_options.minZoom) {
105 105
          new L.Control.Zoom({position: map_controls_position}).addTo(map);
106 106
        }
107
        if (L.Control.Gps) {
107
        if (L.Control.Gps && $map_widget.data('include-geoloc-button')) {
108 108
          var gps_control = new L.Control.Gps({position: map_controls_position});
109 109
          map.addControl(gps_control);
110 110
        }
combo/apps/maps/templates/maps/map_cell.html
6 6
        data-max-zoom="{{ max_zoom }}" data-init-lat="{{ init_lat }}"
7 7
        data-init-lng="{{ init_lng }}" data-geojson-url="{{ geojson_url }}"
8 8
        data-tile-urltemplate="{{ tile_urltemplate}}" data-map-attribution="{{ map_attribution}}"
9
        data-include-geoloc-button="true"
9 10
        {% if group_markers %}data-group-markers="1"{% endif %}
10 11
        {% if max_bounds.corner1.lat %}
11 12
        data-max-bounds-lat1="{{ max_bounds.corner1.lat }}"
12
-