{"_id":"@appbaseio/googlemaps-markerclusterer","name":"@appbaseio/googlemaps-markerclusterer","dist-tags":{"latest":"1.0.0-alpha.1"},"versions":{"1.0.0-alpha.1":{"name":"@appbaseio/googlemaps-markerclusterer","version":"1.0.0-alpha.1","description":"Creates and manages per-zoom-level clusters for large amounts of markers.","keywords":["cluster","google","maps","marker"],"homepage":"https://github.com/googlemaps/js-markerclusterer","bugs":{"url":"https://github.com/googlemaps/js-markerclusterer/issues"},"repository":{"type":"git","url":"git+https://github.com/googlemaps/js-markerclusterer.git"},"license":"Apache-2.0","author":{"name":"Justin Poehnelt"},"main":"dist/index.umd.js","unpkg":"dist/index.min.js","module":"dist/index.esm.js","types":"dist/index.d.ts","scripts":{"docs":"typedoc src/index.ts && cp -r dist docs/dist && npm run examples && cp -r public docs/public","examples":"rollup -c rollup.config.examples.js","format":"eslint . --fix","lint":"eslint .","prepare":"rm -rf dist && rollup -c","test":"jest --passWithNoTests src/*","test:e2e":"jest --passWithNoTests e2e/*"},"dependencies":{"@appbaseio/fast-deep-equal":"^1.0.0-alpha.1","supercluster":"^7.1.3"},"devDependencies":{"@babel/preset-env":"^7.11.5","@babel/runtime-corejs3":"^7.11.2","@googlemaps/jest-mocks":"^2.0.0","@googlemaps/js-api-loader":"^1.12.3","@rollup/plugin-babel":"^6.0.0","@rollup/plugin-commonjs":"^24.0.0","@rollup/plugin-html":"^1.0.0","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.0.0","@rollup/plugin-typescript":"^11.0.0","@types/d3-interpolate":"^3.0.1","@types/google.maps":"^3.44.2","@types/jest":"^27.0.1","@types/selenium-webdriver":"^4.0.9","@types/supercluster":"^7.1.0","@typescript-eslint/eslint-plugin":">=4.1.0","@typescript-eslint/parser":">=4.1.0","chromedriver":"^112.0.0","core-js":"^3.6.5","d3-interpolate":"^3.0.1","eslint":"^7.8.1","eslint-config-prettier":"^8.3.0","eslint-plugin-jest":"^27.0.1","eslint-plugin-prettier":"^4.0.0","geckodriver":"^3.0.0","jest":"^26.4.2","prettier":"^2.1.1","rollup":"^2.26.11","rollup-plugin-terser":"^7.0.2","selenium-webdriver":"^4.0.0-alpha.7","ts-jest":"^26.3.0","typedoc":"^0.24.1","typescript":"^4.0.2"},"publishConfig":{"access":"public"},"gitHead":"2ac332afb468a2346ee1a56976fa2bd2c8e89291","_id":"@appbaseio/googlemaps-markerclusterer@1.0.0-alpha.1","_nodeVersion":"18.12.1","_npmVersion":"9.1.1","dist":{"integrity":"sha512-466ZbUZ4myErdEQibKsSQATDXQ1fAzR3rfCMQ2Si+u+1vrWyZWoFBtAw4xCI9Gu2ofYo4aEE71DRFG8pWf/K+A==","shasum":"e914ed11fe0fb81909238159ae244d6834eaa996","tarball":"https://registry.npmjs.org/@appbaseio/googlemaps-markerclusterer/-/googlemaps-markerclusterer-1.0.0-alpha.1.tgz","fileCount":17,"unpackedSize":764972,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuZvR1i8mRpVNKG1j2vmxNm83Sdz9nHcSW3xdU4duzawIhAJWA3Pjm24UiISrYNsm3HN5aMl0A8Pf5RXUPN77g5Ojh"}]},"_npmUser":{"name":"mohdashraf010897","email":"mohdashraf010897@gmail.com"},"directories":{},"maintainers":[{"name":"savvyshah","email":"shubhamshahrising@gmail.com"},{"name":"siddharthlatest","email":"siddharth@appbase.io"},{"name":"anjuma","email":"kuldepsaxena155@gmail.com"},{"name":"mohdashraf010897","email":"mohdashraf010897@gmail.com"},{"name":"reactivesearch","email":"info@appbase.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/googlemaps-markerclusterer_1.0.0-alpha.1_1683599327077_0.034728636140817226"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-09T02:28:47.006Z","1.0.0-alpha.1":"2023-05-09T02:28:47.384Z","modified":"2023-05-09T02:28:47.588Z"},"maintainers":[{"name":"savvyshah","email":"shubhamshahrising@gmail.com"},{"name":"siddharthlatest","email":"siddharth@appbase.io"},{"name":"anjuma","email":"kuldepsaxena155@gmail.com"},{"name":"mohdashraf010897","email":"mohdashraf010897@gmail.com"},{"name":"reactivesearch","email":"info@appbase.io"}],"description":"Creates and manages per-zoom-level clusters for large amounts of markers.","homepage":"https://github.com/googlemaps/js-markerclusterer","keywords":["cluster","google","maps","marker"],"repository":{"type":"git","url":"git+https://github.com/googlemaps/js-markerclusterer.git"},"author":{"name":"Justin Poehnelt"},"bugs":{"url":"https://github.com/googlemaps/js-markerclusterer/issues"},"license":"Apache-2.0","readme":"# Google Maps JavaScript MarkerClusterer\n\n[![npm](https://img.shields.io/npm/v/@googlemaps/markerclusterer)](https://www.npmjs.com/package/@googlemaps/markerclusterer)\n![Build](https://github.com/googlemaps/js-markerclusterer/workflows/Test/badge.svg)\n![Release](https://github.com/googlemaps/js-markerclusterer/workflows/Release/badge.svg)\n[![codecov](https://codecov.io/gh/googlemaps/js-markerclusterer/branch/main/graph/badge.svg)](https://codecov.io/gh/googlemaps/js-markerclusterer)\n![GitHub contributors](https://img.shields.io/github/contributors/googlemaps/js-markerclusterer?color=green)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![](https://github.com/jpoehnelt/in-solidarity-bot/raw/main/static//badge-flat.png)](https://github.com/apps/in-solidarity)\n\n## Description\n\nThe library creates and manages per-zoom-level clusters for large amounts of markers.\n\n[**Try the demo**](https://googlemaps.github.io/js-markerclusterer/public/defaults/)\n\n![screenshot](https://user-images.githubusercontent.com/3392975/135143029-20abd824-0f3e-4e28-bad3-327acf7aec04.png)\n\nSee the [history section](#history) and [migration section](#migration) for how this library relates to [@google/markerclusterer][@google/markerclusterer] and [@googlemaps/markerclustererplus][@googlemaps/markerclustererplus].\n\n## Install\n\nAvailable via npm as the package [@googlemaps/markerclusterer](https://www.npmjs.com/package/@googlemaps/markerclusterer).\n\n```\nnpm i @googlemaps/markerclusterer\n```\n\nAlternativly you may add the umd package directly to the html document using the unpkg link.\n\n```html\n<script src=\"https://unpkg.com/@googlemaps/markerclusterer/dist/index.min.js\"></script>\n```\n\nWhen adding via unpkg, the `MarkerClusterer` can be accessed at `markerClusterer.MarkerClusterer`.\n\n#### TypeScript\n\nThis library uses the official TypeScript typings for Google Maps Platform, [@types/google.maps](https://www.npmjs.com/package/@types/google.maps).\n\n```sh\nnpm i -D @types/google.maps\n```\n\n## Documentation\n\nThe [reference documentation](https://googlemaps.github.io/js-markerclusterer/) is generated from the TypeScript definitions.\n\n## Examples\n\n```js\nimport { MarkerClusterer } from \"@googlemaps/markerclusterer\";\n\n// use default algorithm and renderer\nconst markerCluster = new MarkerClusterer({ map, markers });\n```\n\nView the package in action:\n\n- [Algorithm Comparisons](https://googlemaps.github.io/js-markerclusterer/public/algorithms) - This example demonstrates the different algorithms. Please note that spacing and many other options can be changed for each algorithm. \n\n\n\n- [Renderer Usage](https://googlemaps.github.io/js-markerclusterer/public/renderers) - This example demonstrates different renderers similar to the image below.\n\n![Screen Shot 2021-09-28 at 1 41 06 PM](https://user-images.githubusercontent.com/3392975/135154898-a5abb5a4-3022-44e0-92d2-5dcefa247e87.png)\n\n## History\n\nThis library has a heritage in [@google/markerclusterer][@google/markerclusterer] and [@googlemaps/markerclustererplus][@googlemaps/markerclustererplus], originally made available on [code.google.com](https://code.google.com/archive/) and then transferred to GitHub at https://github.com/googlemaps/v3-utility-library. The following is an approximate timeline.\n\n- 201X - [@google/markerclusterer][@google/markerclusterer] was created.\n- 201X - [@googlemaps/markerclustererplus][@googlemaps/markerclustererplus] was created.\n- 2019 - Libraries were published to NPM.\n- 2019 - [@google/markerclusterer][@google/markerclusterer] was deprecated for [@googlemaps/markerclustererplus][@googlemaps/markerclustererplus].\n- 2020 - [@googlemaps/markerclustererplus][@googlemaps/markerclustererplus] was refactored to TypeScript.\n- 2020 - [@googlemaps/markerclustererplus][@googlemaps/markerclustererplus] was moved to a separate repository.\n- 2021 - [@googlemaps/markerclustererplus][@googlemaps/markerclustererplus] was rewritten as [@googlemaps/markerclusterer (**new**)][@googlemaps/markerclusterer].\n- TBD - [@googlemaps/markerclustererplus][@googlemaps/markerclustererplus] is deprecated for [@googlemaps/markerclusterer (**new**)][@googlemaps/markerclusterer].\n\n## Migration\n\nThe API of [@googlemaps/markerclusterer][@googlemaps/markerclusterer] has changed in a number of ways from [@googlemaps/markerclustererplus][@googlemaps/markerclustererplus].\n\n- The `MarkerClusterer` class now accepts an `algorithm` and `renderer` parameter to allow for more flexibility. The interface looks like the following:\n\n```js\n{\n    algorithm?: Algorithm;\n    map?: google.maps.Map;\n    markers?: google.maps.Marker[];\n    renderer?: Renderer;\n    onClusterClick?: onClusterClickHandler;\n  }\n```\n\n- The `MarkerClusterer` accepts a single options argument instead of positional parameters.\n- The traditional `GridAlgorithm` is still supported, **but is not the default**. The default is [supercluster](https://www.npmjs.com/package/supercluster) which uses [k-d trees](https://en.wikipedia.org/wiki/K-d_tree) for improved performance.\n- Styling of clusters has been simplifed and moved to the renderer interface.\n- The `MarkerClusterer` class is still an instance of `google.maps.OverlayView`, but uses `google.maps.Marker`s instead of `google.maps.Overlay` to render the clusters. This solves issues related to the usage of map panes and click handlers.\n- @googlemaps/markerclusterer supports Marker and Map [a11y improvements](https://cloud.google.com/blog/products/maps-platform/improved-accessibility-maps-javascript-api).\n\n[@googlemaps/markerclustererplus]: https://www.npmjs.com/package/@googlemaps/markerclustererplus\n[@google/markerclusterer]: https://www.npmjs.com/package/@google/markerclusterer\n[@googlemaps/markerclusterer]: https://www.npmjs.com/package/@googlemaps/markerclusterer\n","readmeFilename":"README.md"}