Changeset 1224
- Timestamp:
- 09/19/10 17:03:24 (3 years ago)
- Location:
- g-map
- Files:
-
- 21 removed
- 3 modified
- 7 moved
-
files/icon/g-map/bmarker.png (deleted)
-
files/icon/g-map/bmarker0.png (deleted)
-
files/icon/g-map/bmarker00.png (deleted)
-
files/icon/g-map/bmarker000.png (deleted)
-
files/icon/g-map/bmarker0000.png (deleted)
-
files/icon/g-map/dialog-error.png (deleted)
-
files/icon/g-map/dialog-error.svg (deleted)
-
files/icon/g-map/dialog-warning.png (deleted)
-
files/icon/g-map/dialog-warning.svg (deleted)
-
files/icon/g-map/gmarker0.png (deleted)
-
files/icon/g-map/lineAdd.png (deleted)
-
files/icon/g-map/marker.png (deleted)
-
files/icon/g-map/marker0.png (deleted)
-
files/icon/g-map/marker00.png (deleted)
-
files/icon/g-map/marker000.png (deleted)
-
files/icon/g-map/marker0000.png (deleted)
-
files/icon/g-map/markerAddM.png (deleted)
-
files/icon/g-map/ymarker0.png (deleted)
-
files/icon/g-map/zoom.gif (deleted)
-
files/icon/glob128.png (deleted)
-
files/icon/glob64.png (deleted)
-
files/icon/gmap (moved) (moved from g-map/files/icon/g-map)
-
files/icon/gmap.svg (moved) (moved from g-map/files/icon/glob.svg)
-
files/icon/gmap16.png (moved) (moved from g-map/files/icon/glob16.png)
-
files/icon/gmap24.png (moved) (moved from g-map/files/icon/glob24.png)
-
files/icon/gmap32.png (moved) (moved from g-map/files/icon/glob32.png)
-
files/icon/gmap48.png (moved) (moved from g-map/files/icon/glob48.png)
-
files/lib/data/gmap/GmapApi.class.php (moved) (moved from g-map/files/lib/data/gmap/Gmap.class.php) (3 diffs)
-
files/lib/data/gmap/GmapCluster.class.php (modified) (1 diff)
-
files/lib/data/gmap/GmapPersonal.class.php (modified) (1 diff)
-
pagemenu.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
g-map/files/lib/data/gmap/GmapApi.class.php
r1223 r1224 7 7 * @license GNU General Public License <http://opensource.org/licenses/gpl-3.0.html> 8 8 */ 9 class Gmap extends DatabaseObject { 9 class GmapApi extends DatabaseObject { 10 protected $apikey = null; 11 protected $cache_search = array(); 12 13 /** 14 * 15 */ 16 public function __construct() { 17 18 $res = null; 19 20 $apikey = GMAP_API_KEY; 21 $apikey = explode("\n", $apikey); 22 $apikey = $apikey[0]; 23 $apikey = explode(":", $apikey); 24 if(count($apikey) == 2) { 25 $this->apikey = $apikey; 26 } 27 } 28 29 /** 30 * is active? api key existent? 31 */ 32 public function isActive() { 33 return !empty($this->apikey); 34 } 10 35 11 36 /** … … 13 38 * @param location 14 39 */ 15 public static function search($location) { 16 $res = null; 40 public function search($location) { 17 41 18 $lookupstring = urlencode(trim($location)); 42 if(!$this->isActive()) { 43 return; 44 } 45 46 $lookupstring = urlencode(StringUtil::trim($location)); 47 if(isset($this->cache_search[$lookupstring])) { 48 return $this->cache_search[$lookupstring]; 49 } 19 50 20 51 $req_url = "maps.google.com"; 21 52 $io = @fsockopen($req_url, 80, $errno, $errstr, 5 ); 22 53 if ($io) { 23 $send = "GET /maps/geo?q=".$lookupstring."&key=". MAP_API."&output=csv HTTP/1.1\r\n";54 $send = "GET /maps/geo?q=".$lookupstring."&key=".$apikey."&output=csv HTTP/1.1\r\n"; 24 55 $send .= "Host: maps.google.com\r\n"; 25 56 $send .= "Accept-Language: de, en;q=0.50\r\n"; 26 57 $send .= "Connection: Close\r\n\r\n"; 27 58 fputs($io, $send); 28 59 29 60 while (!feof($io)) { 30 61 $send = fgets($io, 4096); … … 39 70 fclose($io); 40 71 } 41 42 return $ res;72 73 return $this->cache_search[$lookupstring] = $res; 43 74 } 44 75 } -
g-map/files/lib/data/gmap/GmapCluster.class.php
r1223 r1224 8 8 */ 9 9 class GmapCluster { 10 10 11 const OFFSET = 268435456; 11 12 const RADIUS = 85445659.4471; /* $self::OFFSET / pi() */ -
g-map/files/lib/data/gmap/GmapPersonal.class.php
r1222 r1224 1 1 <?php 2 3 /** 4 * personal objects 5 * 6 * @author Torben Brodt 7 * @license GNU General Public License <http://opensource.org/licenses/gpl-3.0.html> 8 */ 2 9 class GmapPersonal { 3 10 -
g-map/pagemenu.xml
r1221 r1224 4 4 <import> 5 5 <pagemenuitem name="wcf.header.menu.map"> 6 <icon> mapM.png</icon>6 <icon>gmapM.png</icon> 7 7 <link>index.php?page=Map</link> 8 8 <showorder>10</showorder>
