PHPackages                             janfish/marker-clusterer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. janfish/marker-clusterer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

janfish/marker-clusterer
========================

marker cluster

01PHP

Since Sep 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/zeng444/marker.clusterer)[ Packagist](https://packagist.org/packages/janfish/marker-clusterer)[ RSS](/packages/janfish-marker-clusterer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

### 标记聚合器

[](#标记聚合器)

> 用来解决加载大量点要素到地图上产生覆盖现象的问题，并提高性能

```
use Janfish\MarkerClusterer\MarkerClusterer;

$positions = [
    [104.082246, 30.656996, ["extendA" => "a"]],
    [104.082965, 30.656926, ["extendA" => "3"]],
    [104.084757, 30.656857],
    [104.083840, 30.655413],
    [104.082252, 30.654001],
    [104.081254, 30.654061, ["extendA" => "333"]],
    [104.081313, 30.653567],
    [104.082413, 30.649889],
    [104.081603, 30.649796],
    [104.081490, 30.649949],
    [104.076925, 30.641803],
    [104.076925, 30.641803],
    [104.077199, 30.641295],
    [104.076887, 30.641401],
];
$scene = new MarkerClusterer([
    'gridSize' => 100,
    'averageCenter' => true,
    'minimumClusterSize' => 2,
    'countOnly' => false,
]);
$scene->addMakers($positions);
$scene->addMaker(104.076887, 30.641401, ["extra data"]);
foreach ($scene->getClusters() as $cluster) {
    echo 'center position' . $cluster->getCenter()->getPosition() . PHP_EOL;
    foreach ($cluster->getMakers() as $maker) {
        echo $maker->getPosition() . ' ' . json_encode($maker->getExtend()) . PHP_EOL;
    }
    echo PHP_EOL;
}
```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/60a62fd9f299f25558ac4a898ae3833bd7185ba4706bb167a8cabf05a3d96955?d=identicon)[Robert Zeng](/maintainers/Robert%20Zeng)

---

Top Contributors

[![zeng444](https://avatars.githubusercontent.com/u/941266?v=4)](https://github.com/zeng444 "zeng444 (3 commits)")

### Embed Badge

![Health badge](/badges/janfish-marker-clusterer/health.svg)

```
[![Health](https://phpackages.com/badges/janfish-marker-clusterer/health.svg)](https://phpackages.com/packages/janfish-marker-clusterer)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
