diff --git a/js/map/Map.js b/js/map/Map.js index 377fcf1..2750f9a 100644 --- a/js/map/Map.js +++ b/js/map/Map.js @@ -9,6 +9,7 @@ import UrlParamChangeNotifier from '../url/UrlParamChangeNotifier'; import BaseLayers from './BaseLayers'; import Overlays from './Overlays'; +import AttributionControl from './controls/AttributionControl'; import ZoomControl from './controls/ZoomControl'; import LocateControl from './controls/LocateControl'; import ScaleControl from './controls/ScaleControl'; @@ -34,6 +35,7 @@ export default class Map { this.map = L.map(mapContainerHtmlElementId, { zoomControl: false, + attributionControl: false, }); this.id = mapContainerHtmlElementId; @@ -50,6 +52,8 @@ export default class Map { this.map.addControl(new ScaleControl().getMapControl()); + this.map.addControl(new AttributionControl().getMapControl()); + this.map.addControl(new LoadingIndicatorControl().getMapControl()); // Create map controls for layers and overlays diff --git a/js/map/controls/AttributionControl.js b/js/map/controls/AttributionControl.js new file mode 100644 index 0000000..72744bf --- /dev/null +++ b/js/map/controls/AttributionControl.js @@ -0,0 +1,13 @@ +import L from 'leaflet'; + +import MapControl from './MapControl'; + +export default class AttributionControl extends MapControl { + constructor() { + const attributionControl = L.control.attribution({ + prefix: 'Leaflet', + }); + + super(attributionControl); + } +}