Closed TomWeber124 closed 6 years ago
@TomWeber124 Can you create a simplified "un"-working example of your problem on GitHub? And link it here?
I did. You can find it here: https://github.com/TomWeber124/yagatest
I´ve pretty much broken it down to the basics.
So by clicking on the switch button, the "table" is hidden via *ngIf and the size of the map should switch from 50% to 100% via [ngClass].
The cursor and inspector indicate this happened, but the missing tiles won´t load. If i however change the size of the browser window (minimizing, changing dimensions, etc.) and then go back maximizing it, it loads the missing tiles just fine.
As far as i´ve come, there is the invalidateSize()-function of LeafletJS if you come across something similar in a VanillaJS-environment, to trigger a tile reload manually.
Yes, that is right you just have to invalidate the map. In leaflet-ng2 it is quite easy, because the MapComponent is derived from the Map-class of Leaflet. You just have to import it into your controller as Angular ViewChild.
Hello.
I´m using yaga leaflet-ng2 with the following dependencies:
Situation is as follows:
I´m not an expert regarding the angular lifecycle-hooks or leaflet for that matter. I´m not entirely sure it actually is a leaflet-ng2 problem, a scenario i toyed in plain js with leaflet didn´t throw the same problem though, so i suspect there might be something here.
Any help would be greatly appreciated.
Thank you in advance.