I'm currently writing my own logic for leaflet and need a way to load ng-templates in the same component to display icons on the map.
My current state looks like this (unfortunately nothing is displayed on the map).
My template:
<ng-template #myTemp let-data="cl" let-gl="cl.gl" let-lid="cl.id">
<ng-container>
<div class="custom-class">
<!-- .. -->
</div>
</ng-container>
</ng-template>
Inside the .ts file:
@ViewChild('myTemp') myTemp: TemplateRef<any>;
And then I set the map options in the ngAfterViewInit lifecycle method like this:
this.opts.myTemp = this.myTemp;
I have the feeling that the templates are not loaded because they are in the same components and ViewChild is used. However, the map has the correct coordinates that it automatically zooms in place.
What am I doing wrong or is the reason more of something else?