File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
projects/ngx-mapbox-gl/src/lib/control Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { ControlComponent } from './control.component';
9
9
export class AttributionControlDirective implements OnInit {
10
10
/* Init inputs */
11
11
@Input ( ) compact ?: boolean ;
12
+ @Input ( ) customAttribution ?: string | string [ ] ;
12
13
13
14
constructor (
14
15
private MapService : MapService ,
@@ -20,10 +21,13 @@ export class AttributionControlDirective implements OnInit {
20
21
if ( this . ControlComponent . control ) {
21
22
throw new Error ( 'Another control is already set for this control' ) ;
22
23
}
23
- const options : { compact ?: boolean } = { } ;
24
+ const options : { compact ?: boolean , customAttribution ?: string | string [ ] } = { } ;
24
25
if ( this . compact !== undefined ) {
25
26
options . compact = this . compact ;
26
27
}
28
+ if ( this . customAttribution !== undefined ) {
29
+ options . customAttribution = this . customAttribution ;
30
+ }
27
31
this . ControlComponent . control = new AttributionControl ( options ) ;
28
32
this . MapService . addControl ( this . ControlComponent . control , this . ControlComponent . position ) ;
29
33
} ) ;
You can’t perform that action at this time.
0 commit comments