Collection of ngx-leaflet tutorials focused on Leaflet plugin integration
Angular CLI uses Webpack to manage dependency resolution and bundling.
Things can get a little complicated when you mix libraries that use different module systems.
Leaflet is tricky because they recently migrated to using ES6 modules, but historically used an IIFE that exposed the library under the global variable L
.
This means that extensions for Leaflet vary in how they package their own modules and require subtly different approaches to integrating with your project.
With most of these examples, there is more than one way to get things working, and I'm no Webpack expert. So, if there are obvious improvements that can be made, feel free to submit an issue or a pull request.
The following is a list of projects that demonstrate how to integrate specific Leaflet plugins with @asymmetrik/ngx-leaflet and @angular/cli.
Demonstrates how to use leaflet.browser.print with @asymmetrik/ngx-leaflet and @angular/cli. Leaflet.BrowserPrint on GitHub.
Demonstrates how to use Leaflet.Coordinates with @asymmetrik/ngx-leaflet and @angular/cli. Leaflet.Coordinates on GitHub.
Demonstrates how to use Leaflet.fullscreen with @asymmetrik/ngx-leaflet and @angular/cli. Leaflet.Fullscreen on GitHub.
Demonstrates how to use Leaflet.Path.Transform and Leaflet.Path.Drag with @asymmetrik/ngx-leaflet and @angular/cli. Leaflet.Path.Transform on GitHub.
Demonstrates how to use Leaflet.TimeDimension with @asymmetrik/ngx-leaflet and @angular/cli. Leaflet.TimeDimension on GitHub.
Demonstrates how to use heatmap.js and the HeatmapOverlay layer with @asymmetrik/ngx-leaflet and @angular/cli. heatmap.js on GitHub
Clone this repo and then go into each subdirectory for a self-contained @angular/cli project. See the specific README.md for details.
If you find an issue with the tutorial, feel free to submit an issue. PRs are welcome and encouraged.
See LICENSE in repository for details.
Leaflet Is an awesome mapping package.