diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | templates/web/base/maps/osm.html | 1 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/assets.js | 3 | ||||
-rw-r--r-- | web/js/map-OpenStreetMap.js | 1 |
4 files changed, 6 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index d5f650411..50a3f18de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - Asset layers can be attached to more than one category each. #2049 - Cobrands hook to remove phone number field. #2049 - Check recent reports for any hidden since cached. #2053 + - Asset layer attribution automatically shown. #2061 - Bugfixes: - Stop asset layers obscuring marker layer. #1999 - Don't delete hidden field values when inspecting reports. #1999 diff --git a/templates/web/base/maps/osm.html b/templates/web/base/maps/osm.html index 51c3ad388..70d05929f 100644 --- a/templates/web/base/maps/osm.html +++ b/templates/web/base/maps/osm.html @@ -1,3 +1,4 @@ [% +map.copyright = ''; # This is handled with OpenLayers.Control.Attribution map_html = INCLUDE maps/openlayers.html %] diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js index 6c64bb922..57c82a46b 100644 --- a/web/cobrands/fixmystreet/assets.js +++ b/web/cobrands/fixmystreet/assets.js @@ -475,6 +475,9 @@ fixmystreet.assets = { styleMap: options.stylemap || get_asset_stylemap(), assets: true }; + if (options.attribution !== undefined) { + layer_options.attribution = options.attribution; + } if (options.srsName !== undefined) { layer_options.projection = new OpenLayers.Projection(options.srsName); } else if (fixmystreet.wmts_config) { diff --git a/web/js/map-OpenStreetMap.js b/web/js/map-OpenStreetMap.js index a742e61ba..4165f8ee4 100644 --- a/web/js/map-OpenStreetMap.js +++ b/web/js/map-OpenStreetMap.js @@ -5,6 +5,7 @@ fixmystreet.maps.config = function() { } fixmystreet.controls = [ new OpenLayers.Control.ArgParser(), + new OpenLayers.Control.Attribution(), //new OpenLayers.Control.LayerSwitcher(), new OpenLayers.Control.Navigation(), new OpenLayers.Control.PermalinkFMS(permalink_id), |