{"id":28088905,"url":"https://github.com/gmaps-marker-clusterer/gmaps-marker-clusterer","last_synced_at":"2025-05-13T12:52:15.907Z","repository":{"id":13870137,"uuid":"75172163","full_name":"gmaps-marker-clusterer/gmaps-marker-clusterer","owner":"gmaps-marker-clusterer","description":"Fork of the marker clustering library for the Google Maps JavaScript API v3.","archived":false,"fork":false,"pushed_at":"2022-05-09T15:50:46.000Z","size":644,"stargazers_count":98,"open_issues_count":19,"forks_count":48,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-13T06:15:10.509Z","etag":null,"topics":["javascript","maps"],"latest_commit_sha":null,"homepage":"https://gmaps-marker-clusterer.github.io/gmaps-marker-clusterer/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gmaps-marker-clusterer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-30T09:33:30.000Z","updated_at":"2024-03-27T03:16:08.000Z","dependencies_parsed_at":"2022-08-08T18:30:13.578Z","dependency_job_id":null,"html_url":"https://github.com/gmaps-marker-clusterer/gmaps-marker-clusterer","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmaps-marker-clusterer%2Fgmaps-marker-clusterer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmaps-marker-clusterer%2Fgmaps-marker-clusterer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmaps-marker-clusterer%2Fgmaps-marker-clusterer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmaps-marker-clusterer%2Fgmaps-marker-clusterer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmaps-marker-clusterer","download_url":"https://codeload.github.com/gmaps-marker-clusterer/gmaps-marker-clusterer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253892498,"owners_count":21979996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","maps"],"created_at":"2025-05-13T12:52:15.178Z","updated_at":"2025-05-13T12:52:15.891Z","avatar_url":"https://github.com/gmaps-marker-clusterer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub version](https://badge.fury.io/gh/gmaps-marker-clusterer%2Fgmaps-marker-clusterer.svg)](https://badge.fury.io/gh/gmaps-marker-clusterer%2Fgmaps-marker-clusterer) [![npm version](https://badge.fury.io/js/gmaps-marker-clusterer.svg)](https://badge.fury.io/js/gmaps-marker-clusterer) [![License](https://img.shields.io/badge/license-APACHE2-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![License: CC BY-SA 4.0](https://img.shields.io/badge/License-CC%20BY--SA%204.0-lightgrey.svg)](http://creativecommons.org/licenses/by-sa/4.0/) [![](https://data.jsdelivr.com/v1/package/npm/gmaps-marker-clusterer/badge)](https://www.jsdelivr.com/package/npm/gmaps-marker-clusterer) ![vsts build status](https://sebastianhoesl.visualstudio.com/_apis/public/build/definitions/478f5831-35e2-441a-b1e4-191819c8189a/18/badge)\n\n**Please note:** This is a fork of the js-marker-clusterer library, the original repository can be found here https://github.com/googlemaps/js-marker-clusterer\n\n![Logo](https://cdn.rawgit.com/gmaps-marker-clusterer/gmaps-marker-clusterer/master/gmaps-marker-clusterer-logo.svg)\n\n# Gmaps Marker Clusterer\n\n**A JavaScript API utility library for Google Maps**\n\nA Google Maps JavaScript API v3 library to create and manage per-zoom-level clusters for large amounts of markers.\n\n[Reference documentation](https://gmaps-marker-clusterer.github.io/gmaps-marker-clusterer/)\n\nMigrated from the [Google Maps JavaScript API utility libraries on Google Code](https://code.google.com/p/google-maps-utility-library-v3/).\n\n## Usage\n\nDownload or clone `markerclusterer.js` and images `m1.png` to `m5.png`, save images in `images` folder.\n\nTo use your own custom cluster images just name your images `m[1-5].png` or set the `imagePath` option to the location and name of your images like this: `imagePath: 'customImages/cat'` for images `cat1.png` to `cat5.png`.\n\nindex.html\n\n```\n\u003cdiv id=\"map-container\"\u003e\u003cdiv id=\"map\"\u003e\u003c/div\u003e\u003c/div\u003e\n\u003cscript src=\"markerclusterer.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    function initialize() {\n        var center = new google.maps.LatLng(51.5074, 0.1278);\n\n        var map = new google.maps.Map(document.getElementById('map'), {\n          zoom: 3,\n          center: center,\n          mapTypeId: google.maps.MapTypeId.ROADMAP\n        });\n\n        var markers = [];\n        var marker = new google.maps.Marker({\n            position: new google.maps.LatLng(51.5074, 0.1278)\n        });\n        markers.push(marker);\n\n        var options = {\n            imagePath: 'images/m'\n        };\n\n        var markerCluster = new MarkerClusterer(map, markers, options);\n    }\n\n    google.maps.event.addDomListener(window, 'load', initialize);\n\u003c/script\u003e\n```\n\n### Custom CSS\n\nCustomize the cluster pins by using the `cssClass`-option.\n\n#### Adding a custom CSS-Class `custom-pin` to the options:\n\n```\nvar center = new google.maps.LatLng(37.4419, -122.1419),\n    map = new google.maps.Map(document.getElementById('map'), {\n        zoom: 3,\n        center: center,\n        mapTypeId: google.maps.MapTypeId.ROADMAP\n    }),\n    markers = [],\n    options = {\n        cssClass: 'custom-pin'\n    };\n\nfor (var i = 0; i \u003c 100; i++) {\n    var dataPhoto = data.photos[i];\n    var latLng = new google.maps.LatLng(dataPhoto.latitude,\n        dataPhoto.longitude);\n    var marker = new google.maps.Marker({\n    position: latLng\n    });\n    markers.push(marker);\n}\n\nvar markerCluster = new MarkerClusterer(map, markers, options);\n```\n\n#### Add your custom styles:\n\n```\n.custom-pin {\n    height: 1em;\n    line-height: 1;\n    width: 1em;\n    padding: .7em;\n    text-align: center;\n    cursor: pointer;\n    color: white;\n    background: black;\n    position: absolute;\n    border-radius: .5em;\n    font-size: 1em;\n    font-weight: bold;\n    transition: all 500ms;\n}\n\n.custom-pin::after {\n    content: '';\n    border-width: 1em .5em;\n    border-color: black transparent transparent transparent;\n    border-style: solid;\n    position: absolute;\n    top: 99%;\n    left: calc(50% - .5em);\n}\n\n.custom-pin:hover {\n    transform: scale(1.15);\n}\n```\n\nHave a look at the [custom-css example](examples/custom-css_example.html).\n\n## Live Demos\n\n[![Marker Clusterer Screenshot](https://googlemaps.github.io/js-marker-clusterer/screenshot.png)](https://gmaps-marker-clusterer.github.io/gmaps-marker-clusterer/#examples)\n\n[Examples page](https://gmaps-marker-clusterer.github.io/gmaps-marker-clusterer/#examples)\n\n## License\n\nAll code is licensed under Apache 2.0. See [LICENSE](LICENSE)-File.\n\nThe gmaps-marker-clusterer Logo is licensed under [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/).\n[![CC BY-SA 4.0](https://i.creativecommons.org/l/by-sa/4.0/88x31.png)](http://creativecommons.org/licenses/by-sa/4.0/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmaps-marker-clusterer%2Fgmaps-marker-clusterer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmaps-marker-clusterer%2Fgmaps-marker-clusterer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmaps-marker-clusterer%2Fgmaps-marker-clusterer/lists"}