Core Angular integration library for Leaflet maps, providing directives and components for flexible map management.
@bluehalo/ngx-leaflet is an Angular wrapper library for Leaflet, the popular open-source JavaScript library for interactive maps. It provides Angular directives and components that allow developers to embed and control Leaflet maps declaratively within Angular applications, handling map creation, layer management, and event binding through Angular's data flow.
Angular developers building web applications that require interactive, embeddable maps—such as dashboards, data visualization tools, location-based services, or geospatial analysis platforms.
Developers choose ngx-leaflet because it offers a seamless, idiomatic Angular API for Leaflet, eliminating the need to manually bridge Angular's change detection with Leaflet's imperative API. It provides reactive map controls, comprehensive event integration, and extensibility through official plugins, making it the standard choice for Leaflet maps in Angular ecosystems.
Core Leaflet package for Angular.io
Uses Angular directives like leaflet and leafletLayers for intuitive, template-driven map setup, making it feel native to Angular developers, as shown in the basic usage examples.
Supports dynamic layer management through bindings with mutable array handling, allowing easy updates without immutable data structures, though performance optimizations are needed for large sets.
Map and layer events are exposed as Angular outputs and run within the Angular zone, ensuring proper change detection without extra boilerplate, as documented in the events section.
Has dedicated extensions for Leaflet Draw, Markercluster, and D3, enabling seamless integration of advanced mapping features, listed in the Extensions part of the README.
Requires manual configuration of Leaflet CSS and marker images in Angular CLI projects, adding initial overhead, as detailed in the 'A Note About Markers' section with steps for asset copying.
Mutable layer arrays trigger deep comparisons that can degrade performance with many layers, necessitating workarounds like layer groups or OnPush change detection, admitted in the mutable layers documentation.
Not all Leaflet events are exposed; developers must manually handle some events using NgZone or ChangeDetectorRef, increasing complexity, as noted in the change detection warnings.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.