Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@asymmetrik/angular2-leaflet-markercluster
Advanced tools
Angular 2 components for leaflet markercluster plugin
IMPORTANT: This package has been renamed to @asymmetrik/ngx-leaflet-markercluster
Extension to the @asymmetrik/angular2-leaflet package for Angular 2+ Provides leaflet.markercluster integration into Angular 2 projects. Compatible with Leaflet v1.0.x and leaflet.markercluster v1.x
Supports Angular v4, Ahead-of-Time compilation (AOT), and use in Angular-CLI based projects
Install the package and its peer dependencies via npm:
npm install leaflet
npm install leaflet.markercluster
npm install @asymmetrik/angular2-leaflet
npm install @asymmetrik/angular2-leaflet-markercluster
If you intend to use this library in a typescript project (utilizing the typings), you will need to also install the leaflet typings via npm:
npm install @types/leaflet
npm install @types/leaflet.markercluster
This plugin is used with the Angular 2 Leaflet plugin.
To create a map, use the leaflet
attribute directive. This directive must appear first.
You must specify an initial zoom/center and set of layers either via leafletOptions
or by binding to leafletZoom
, leafletCenter
, and leafletLayers
.
<div leaflet style="height: 400px;"
[leafletMarkerCluster]="markerClusterData"
[leafletMarkerClusterOptions]="markerClusterOptions">
</div>
Finally, to initialize and configure the leaflet markercluster plugin, use the following attribute directives:
This attribute is an attribute directive that initiates the marker cluster plugin.
Input binding for the options to be passed directly to the marker cluster plugin upon creation. These options are only currently processed at creation time.
The options object is passed through to the leaflet.markercluster object. Therefore, you can reference their documentation for help configuring this plugin.
There is an optional output event emitter that will expose the markercluster group being used by the plugin called leafletMarkerClusterReady
.
See the following example:
<div leaflet style="height: 400px;"
[leafletMarkerCluster]="markerClusterData"
[leafletMarkerClusterOptions]="markerClusterOptions"
(leafletMarkerClusterReady)="markerClusterReady($event)">
</div>
markerClusterReady(markerCluster: L.MarkerClusterGroup) {
// Do stuff with group
}
PRs accepted. If you are part of Asymmetrik, please make contributions on feature branches off of the develop
branch. If you are outside of Asymmetrik, please fork our repo to make contributions.
See LICENSE in repository for details.
FAQs
Angular 2 components for leaflet markercluster plugin
The npm package @asymmetrik/angular2-leaflet-markercluster receives a total of 8 weekly downloads. As such, @asymmetrik/angular2-leaflet-markercluster popularity was classified as not popular.
We found that @asymmetrik/angular2-leaflet-markercluster demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.