Skip to content

Commit

Permalink
fix(layer): fix layer event not being binded
Browse files Browse the repository at this point in the history
close #84
  • Loading branch information
Wykks committed Dec 17, 2018
1 parent 90a6dcf commit b7fbb89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/ngx-mapbox-gl/src/lib/layer/layer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ export class LayerComponent implements OnInit, OnDestroy, OnChanges, Layer {
ngOnInit() {
this.sub = this.MapService.mapLoaded$.pipe(
switchMap(() => fromEvent(<any>this.MapService.mapInstance, 'styledata').pipe(
startWith(true),
mapTo(false),
filter(() => !this.MapService.mapInstance.getLayer(this.id)),
mapTo(false)
startWith(true)
)),
).subscribe((bindEvents: boolean) => this.init(bindEvents));
}
Expand Down

0 comments on commit b7fbb89

Please sign in to comment.