Geo

Clusterer
in package

Please report bugs on https://github.com/matthiasmullie/geo/issues.

Tags
author

Matthias Mullie geo@mullie.eu

copyright

Copyright (c) 2013, Matthias Mullie. All rights reserved.

license

MIT License

Table of Contents

Methods

__construct()  : mixed
addCoordinate()  : mixed
getClusters()  : array<string|int, Cluster>
getCoordinates()  : array<string|int, Coordinate>
setMinClusterLocations()  : mixed
Set the minimum amount of locations before clustering.
setNumberOfClusters()  : mixed
Set an approximate amount of clusters.
setSaveCoordinates()  : mixed
Enables coordinate saving in clusters.

Methods

setMinClusterLocations()

Set the minimum amount of locations before clustering.

public setMinClusterLocations(int $limit) : mixed
Parameters
$limit : int

setNumberOfClusters()

Set an approximate amount of clusters.

public setNumberOfClusters(int $number) : mixed

Approximate in that it also depends on the viewport: less square = less clusters.

Parameters
$number : int

setSaveCoordinates()

Enables coordinate saving in clusters.

public setSaveCoordinates(bool $save) : mixed

Note that while it allows you to retrieve all Coordinate objects in a cluster, this does not scale. At some point, if you keep adding coordinates into clusters, you'll run out of memory because we're saving all those coordinates. If you don't need the exact information of coordinates in a cluster, leave this disabled.

Parameters
$save : bool
Tags
throws
Exception

        
On this page

Search results