All Projects → googlemaps → js-markerclusterer

googlemaps / js-markerclusterer

Licence: Apache-2.0 license
Create and manage clusters for large amounts of markers

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to js-markerclusterer

Dual-color-Polyline-Animation
This library will help to show the polyline in dual color similar as Uber.
Stars: ✭ 73 (-20.65%)
Mutual labels:  maps, google-maps, markers
Flask Googlemaps
Easy way to add GoogleMaps to Flask applications. maintainer: @RiverFount
Stars: ✭ 550 (+497.83%)
Mutual labels:  googlemaps, maps, google-maps
Maplace.js
A Google Maps Javascript plugin for jQuery.
Stars: ✭ 1,021 (+1009.78%)
Mutual labels:  maps, google-maps, markers
Mapme
The Android maps adapter
Stars: ✭ 844 (+817.39%)
Mutual labels:  googlemaps, maps, markers
React Native Map Clustering
React Native map clustering both for Android and iOS.
Stars: ✭ 450 (+389.13%)
Mutual labels:  maps, clustering, markers
Airbnb Android Google Map View
This is a sample Android Application which has Google Map view similar to what AirBnb Android Application. Moving Markers like Uber/Ola. Custom Google Search for places. Recycler view with Animations added.
Stars: ✭ 175 (+90.22%)
Mutual labels:  googlemaps, maps, google-maps
svelte-googlemaps
Svelte Google Maps Components
Stars: ✭ 62 (-32.61%)
Mutual labels:  googlemaps, maps, google-maps
React Native Open Maps
🗺 A simple react-native library to perform cross-platform map actions (Google or Apple Maps)
Stars: ✭ 192 (+108.7%)
Mutual labels:  maps, google-maps
Gmapsfx
Java API for using Google Maps within a JavaFX application.
Stars: ✭ 233 (+153.26%)
Mutual labels:  maps, google-maps
Js Samples
Samples for the Google Maps JavaScript v3 API
Stars: ✭ 362 (+293.48%)
Mutual labels:  googlemaps, maps
Benmaps.fr
Web maps that don't track you.
Stars: ✭ 147 (+59.78%)
Mutual labels:  maps, google-maps
Easymap
Ready to use Address Selection Library using Google Maps and Places API.
Stars: ✭ 66 (-28.26%)
Mutual labels:  googlemaps, maps
Carmarker Animation
This android library will help to show the marker move along the route and turn smoothly along the road curves.
Stars: ✭ 154 (+67.39%)
Mutual labels:  googlemaps, markers
Google Maps
Google Maps Web Services API wrapper for .NET
Stars: ✭ 171 (+85.87%)
Mutual labels:  maps, google-maps
React Native Maps
React Native Mapview component for iOS + Android
Stars: ✭ 12,795 (+13807.61%)
Mutual labels:  maps, google-maps
google-maps-utility-library-v3-read-only
git clone of http://google-maps-utility-library-v3.googlecode.com/svn/
Stars: ✭ 51 (-44.57%)
Mutual labels:  googlemaps, maps
Aerialbot
A simple yet highly configurable bot that tweets geotagged aerial imagery of a random location in the world.
Stars: ✭ 157 (+70.65%)
Mutual labels:  maps, google-maps
svelte-mapbox
MapBox Map and Autocomplete components for Svelte (or Vanilla JS)
Stars: ✭ 267 (+190.22%)
Mutual labels:  maps, google-maps
geojson-editor
A modified version of Googles Simple GeoJSON Editor
Stars: ✭ 43 (-53.26%)
Mutual labels:  maps, google-maps
google maps
🗺 An unofficial Google Maps Platform client library for the Rust programming language.
Stars: ✭ 40 (-56.52%)
Mutual labels:  maps, google-maps

Google Maps JavaScript MarkerClusterer

npm Build Release codecov GitHub contributors semantic-release

Description

The library creates and manages per-zoom-level clusters for large amounts of markers.

Try the demo

screenshot

See the history section and migration section for how this library relates to @google/markerclusterer and @googlemaps/markerclustererplus.

Install

Available via npm as the package @googlemaps/markerclusterer.

npm i @googlemaps/markerclusterer

Alternativly you may add the umd package directly to the html document using the unpkg link.

<script src="https://unpkg.com/@googlemaps/markerclusterer/dist/index.min.js"></script>

When adding via unpkg, the MarkerClusterer can be accessed at markerClusterer.MarkerClusterer.

TypeScript

This library uses the official TypeScript typings for Google Maps Platform, @types/google.maps.

npm i -D @types/google.maps

Documentation

The reference documentation is generated from the TypeScript definitions.

Examples

import { MarkerClusterer } from "@googlemaps/markerclusterer";

// use default algorithm and renderer
const markerCluster = new MarkerClusterer({ map, markers });

View the package in action:

  • Algorithm Comparisons - This example demonstrates the different algorithms. Please note that spacing and many other options can be changed for each algorithm.

  • Renderer Usage - This example demonstrates different renderers similar to the image below.

Screen Shot 2021-09-28 at 1 41 06 PM

History

This library has a heritage in @google/markerclusterer and @googlemaps/markerclustererplus, originally made available on code.google.com and then transferred to GitHub at https://github.com/googlemaps/v3-utility-library. The following is an approximate timeline.

Migration

The API of @googlemaps/markerclusterer has changed in a number of ways from @googlemaps/markerclustererplus.

  • The MarkerClusterer class now accepts an algorithm and renderer parameter to allow for more flexibility. The interface looks like the following:
{
    algorithm?: Algorithm;
    map?: google.maps.Map;
    markers?: google.maps.Marker[];
    renderer?: Renderer;
    onClusterClick?: onClusterClickHandler;
  }
  • The MarkerClusterer accepts a single options argument instead of positional parameters.
  • The traditional GridAlgorithm is still supported, but is not the default. The default is supercluster which uses k-d trees for improved performance.
  • Styling of clusters has been simplifed and moved to the renderer interface.
  • The MarkerClusterer class is still an instance of google.maps.OverlayView, but uses google.maps.Markers instead of google.maps.Overlay to render the clusters. This solves issues related to the usage of map panes and click handlers.
  • @googlemaps/markerclusterer supports Marker and Map a11y improvements.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].