Wykks/ngx-mapbox-gl

mgl-markers-for-clusters not rendering properly on lazy loaded routing

Opened this issue · 0 comments

<mgl-geojson-source
      #clusterComponent
      id="sourceA"
      [data]="earthquakes"
      [cluster]="true"
      [clusterRadius]="50"
      [clusterMaxZoom]="3"
    ></mgl-geojson-source>
    <mgl-markers-for-clusters source="sourceA">
        <ng-template mglPoint let-feature>
        </<ng-template>
       <ng-template
          mglClusterPoint
          let-feature
        >
        </ng-template>
</mgl-markers-for-clusters>
this works on first load, but when i go to another route via lazy loaded

` {
    path: 'explore',
    loadChildren: () =>
      import('./explore/explore.module').then((d) => d.ExploreModule),
    // canActivate: [ModuleGuard],
  },`

mgl-markers-for-clusters-0 is now not loaded/visible.

this just happens when i change route