Changeset 1378
- Timestamp:
- 04/03/11 19:14:28 (2 years ago)
- Files:
-
- 2 removed
- 4 modified
-
footscript (deleted)
-
g-map/files/js/gmap/AjaxMap.class.js (modified) (2 diffs)
-
g-map/files/lib/data/gmap/GmapCluster.class.php (modified) (3 diffs)
-
g-map/files/lib/page/MapAjaxPage.class.php (modified) (2 diffs)
-
g-map/package.xml (modified) (2 diffs)
-
googlewave (deleted)
Legend:
- Unmodified
- Added
- Removed
-
g-map/files/js/gmap/AjaxMap.class.js
r1273 r1378 24 24 url += '&bounds=' + this.boundsUsed; 25 25 url += '&action=pick'; 26 url += '&lon=' + marker.getLatLng().x; 27 url += '&lat=' + marker.getLatLng().y; 26 url += '&index=' + marker.index; 28 27 var ajaxRequest = new AjaxRequest(); 29 28 ajaxRequest.openGet(url + SID_ARG_2ND, function (map, id) { … … 100 99 marker = new GMarker(coordinates); 101 100 } 101 marker.index = i; 102 102 GEvent.addListener(marker, "click", function (map, marker) { 103 103 return function () { -
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. */ -
g-map/files/lib/page/MapAjaxPage.class.php
r1374 r1378 54 54 $this->lat = isset($_GET['lat']) ? floatval($_GET['lat']) : 0; 55 55 $this->lon = isset($_GET['lon']) ? floatval($_GET['lon']) : 0; 56 57 // pick action 58 $this->idx = isset($_GET['idx']) ? intval($_GET['idx']) : 0; 56 59 } 57 60 … … 90 93 $cluster = new GmapCluster($this->distance, $this->zoom); 91 94 if($this->action == 'pick') { 92 $ids = $cluster->getIDs($markers, $this-> lat, $this->lon);95 $ids = $cluster->getIDs($markers, $this->idx); 93 96 if($ids === null) { 94 97 $this->datapoints = array(); -
g-map/package.xml
r1325 r1378 10 10 <packagedescription language="it"><![CDATA[Questo pacchetto aggiunge una mappa di Google sul tuo forum.]]></packagedescription> 11 11 <isunique>1</isunique> 12 <version>2.0. 5</version>12 <version>2.0.6</version> 13 13 <date>DATE</date> 14 14 <plugin>com.woltlab.wcf</plugin> … … 45 45 <eventlistener>eventlistener.xml</eventlistener> 46 46 </instructions> 47 48 <instructions type="update" fromversion="2.0.5"> 49 <files>files.tar</files> 50 <templates>templates.tar</templates> 51 </instructions> 47 52 48 53 <instructions type="update" fromversion="2.0.4">
