diff --git a/projects/arlas-components/src/lib/components/mapgl/mapgl.component.ts b/projects/arlas-components/src/lib/components/mapgl/mapgl.component.ts index 5a095fde..517ebcb9 100644 --- a/projects/arlas-components/src/lib/components/mapgl/mapgl.component.ts +++ b/projects/arlas-components/src/lib/components/mapgl/mapgl.component.ts @@ -327,6 +327,12 @@ export class MapglComponent implements OnInit, AfterViewInit, OnChanges, AfterCo */ @Input() public visualisationSetsConfig: Array; + /** + * @Input : Angular + * @description Position of the map attribution + */ + @Input() public mapAttributionPosition: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' = 'bottom-right'; + public visualisationsSets: { visualisations: Map>; status: Map; @@ -736,8 +742,11 @@ export class MapglComponent implements OnInit, AfterViewInit, OnChanges, AfterCo 'NavigationControl.ZoomOut': this.translate.instant(ZOOM_OUT), 'NavigationControl.ResetBearing': this.translate.instant(RESET_BEARING) }, - transformRequest: this.transformRequest + transformRequest: this.transformRequest, + attributionControl: false }); + (this.map).addControl(new mapboxgl.AttributionControl(), this.mapAttributionPosition); + fromEvent(window, 'beforeunload').subscribe(() => { const bounds = (this.map).getBounds(); const mapExtend: MapExtend = { bounds: bounds.toArray(), center: bounds.getCenter().toArray(), zoom: this.map.getZoom() };