markerclustererplus-node
v1.2.2
Published
The following files have been deprecated and will be removed in the next release: * [src/markerclusterer.min.js](https://github.com/mahnunchik/markerclustererplus/blob/master/src/markerclusterer.min.js) * [src/markerclusterer_packed.js](https://github.c
Downloads
25
Maintainers
Readme
MarkerClustererPlus
Warning!
The following files have been deprecated and will be removed in the next release:
Use dist/markerclusterer.min.js instead.
This is an enhanced version of the MarkerClusterer library for managing large amounts of markers. It adds support for several new properties as well as support for four more events. It also allows greater control over the styling of the text that appears on the cluster marker. The documentation has been significantly improved and the overall code has been simplified and polished. Very large numbers of markers can now be managed without causing Javascript timeout errors on Internet Explorer. It is backward compatible with MarkerClusterer.
This is git version of the google svn repo.
This version allows es5 and es6 imports.
Installation
Install with npm.
$ npm install markerclustererplus-node --save
Usage
If using Angular 2+
import MarkerClusterer = require('markerclustererplus-node');
let markers = [
new google.maps.Marker()
]
// map = google map instance
let clusterer = new MarkerClusterer(map, [], options);
You can also use type MarkerClustererOptions
import MarkerClusterer = require('markerclustererplus-node');
let clusterOptions: MarkerClustererOptions = {
gridSize: 20,
maxZoom: 10,
zoomOnClick: true
}
let markers = [
new google.maps.Marker()
]
// map = google map instance
let clusterer = new MarkerClusterer(map, markers, clusterOptions);
Additional Features
- hideLabel option - removes numbers on the clusters
Build
To rebuild a minified version of the library try the following commands:
$ npm install
$ npm run build