Norkart / Leaflet-MiniMap

A minimap control plugin for Leaflet
BSD 2-Clause "Simplified" License
395 stars 125 forks source link

Race condition with leaflet and plugins under Angular 5 #137

Closed atodd-geoplan closed 6 years ago

atodd-geoplan commented 6 years ago

I have recently updated our app to ng 5 (and TS 2.5.3), we are still running with leaflet 1.0.3, along with 7 leaflet plugins including this one.

We are experiencing what look like race conditions. None of the extensions are visible on the L global.

L.control.minimap is undefined

It is very easy to reproduce using a new angular-cli project, adding the two packages and trying..

Any ideas? Assuming this is a webpack issue for now, but thinking someone must have xp-ed this.

see also: https://github.com/angular/devkit/issues/565

atodd-geoplan commented 6 years ago

see: https://www.asymmetrik.com/ngx-leaflet-and-leaflet-plugins/