Changeset 1378 for g-map/files/lib/data/gmap/GmapCluster.class.php
- Timestamp:
- 04/03/11 19:14:28 (2 years ago)
- Files:
-
- 1 modified
-
g-map/files/lib/data/gmap/GmapCluster.class.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
g-map/files/lib/data/gmap/GmapCluster.class.php
r1236 r1378 80 80 * @param $markers Array of lat and lon locations. 81 81 */ 82 public function getMarkers(array $markers, $pick = array()) {82 public function getMarkers(array $markers, $pick = null) { 83 83 $clustered = array(); 84 84 … … 104 104 if (count($cluster) > 0) { 105 105 $cluster[] = $marker; 106 if($pick !== null && count($clustered) == $pick - 1) { 107 $tmp = $this->getCluster($cluster, true); 108 return $tmp['ids']; 109 } 106 110 $clustered[] = $this->getCluster($cluster); 107 111 } else { 112 if($pick !== null && count($clustered) == $pick - 1) { 113 return array($marker['id']); 114 } 108 115 $clustered[] = $marker; 109 116 } … … 116 123 * @param $markers Array of lat and lon locations. 117 124 */ 118 public function getIDs(array $markers, $ lat, $lon) {125 public function getIDs(array $markers, $idx) { 119 126 120 127 /* Loop until all markers have been compared. */
