Changeset 1230
- Timestamp:
- 09/26/10 19:15:59 (3 years ago)
- Location:
- g-map
- Files:
-
- 4 added
- 5 modified
-
de.xml (modified) (1 diff)
-
en.xml (modified) (1 diff)
-
files/js/gmap (added)
-
files/js/gmap/AjaxMap.class.js (added)
-
files/js/gmap/ClusterMarker.class.js (added)
-
files/js/gmap/StreetViewControl.class.js (added)
-
files/lib/system/event/listener/GMapUserPageListener.class.php (modified) (2 diffs)
-
package.xml (modified) (2 diffs)
-
templates/mapOverview.tpl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
g-map/de.xml
r1226 r1230 22 22 </category> 23 23 <category name="wcf.map"> 24 <item name="wcf.map.copyright.small"><![CDATA[Karten Erweiterung, easy-coding.de]]></item>24 <item name="wcf.map.copyright.small"><![CDATA[Karten Programmierung, easy-coding.de]]></item> 25 25 </category> 26 26 </language> -
g-map/en.xml
r1226 r1230 22 22 </category> 23 23 <category name="wcf.map"> 24 <item name="wcf.map.copyright.small"><![CDATA[Map Extension, easy-coding.de]]></item>24 <item name="wcf.map.copyright.small"><![CDATA[Map Development, easy-coding.de]]></item> 25 25 </category> 26 26 </language> -
g-map/files/lib/system/event/listener/GMapUserPageListener.class.php
r1229 r1230 37 37 38 38 // read personal maps 39 if(false) { // TODO: feature disabled for the moment 40 $sql = 'SELECT mapID 41 FROM wcf'.WCF_N.'_gmap_personal 42 WHERE userID = '.intval($this->userID); 43 $result = WCF::getDB()->sendQuery($sql); 44 while ($row = WCF::getDB()->fetchArray($result)) { 45 $this->personal_maps[] = $row; 46 } 39 $sql = 'SELECT mapID 40 FROM wcf'.WCF_N.'_gmap_personal 41 WHERE userID = '.intval($this->userID); 42 $result = WCF::getDB()->sendQuery($sql); 43 while ($row = WCF::getDB()->fetchArray($result)) { 44 $this->personal_maps[] = $row; 47 45 } 48 46 } … … 58 56 59 57 // if user is owner or user has personal maps 58 // TODO: feature disabled for the moment 60 59 if(false && WCF::getUser()->userID == $this->userID || $this->personal_maps) { 61 60 WCF::getTPL()->append('additionalContents3', WCF::getTPL()->fetch('userProfileMapCenter')); -
g-map/package.xml
r1228 r1230 9 9 <packagedescription language="tr"><![CDATA[Bu Paket Foruma Google-Map Haritasi Ekler.]]></packagedescription> 10 10 <isunique>1</isunique> 11 <version>2.0.0 RC 1</version>11 <version>2.0.0 RC 2</version> 12 12 <date>DATE</date> 13 13 <plugin>com.woltlab.wcf</plugin> … … 45 45 <instructions type="update" fromversion="2.0.0 RC 1"> 46 46 <files>files.tar</files> 47 <templates>templates.tar</templates> 48 <languages languagecode="de">de.xml</languages> 49 <languages languagecode="en">en.xml</languages> 47 50 </instructions> 48 51 </package> -
g-map/templates/mapOverview.tpl
r1227 r1230 5 5 {include file='headInclude' sandbox=false} 6 6 {include file='gmapConstants'} 7 <script type="text/javascript"> 8 //<![CDATA[ 9 GMAP_ZOOM = 5; 10 GMAP_ENABLE_STREETVIEW = 1; 11 GMAP_MAP_CONTROL = 'off'; 12 //]]> 13 </script> 7 14 <script src="{@RELATIVE_WCF_DIR}js/gmap/Map.class.js" type="text/javascript"></script> 8 15 <script type="text/javascript" src="{@RELATIVE_WCF_DIR}js/AjaxRequest.class.js"></script> 9 16 <script type="text/javascript"> 10 //<![CDATA[ 11 if (GMAP_API_KEY != '') { 12 document.write('<script src="http://maps.google.com/maps?file=api&v=2.118&hl={@$this->language->getLanguageCode()}&key=' + GMAP_API_KEY + '&oe={CHARSET}" type="text/javascript"><\/script>'); 13 onloadEvents.push(function() { 14 if (GBrowserIsCompatible()) { 15 16 var AjaxMap = function(url, divID, switchable) { 17 this.url = url; 18 this.constructor(divID, switchable); 19 20 this.update = function() { 21 url = this.url; 22 23 if(this.mapInitialized) { 24 url += '&zoom='+this.gmap.getZoom(); 25 url += '&bounds='+this.gmap.getBounds(); 26 url += '&initialized=1'; 27 } 28 29 var ajaxRequest = new AjaxRequest(); 30 ajaxRequest.openGet(url + SID_ARG_2ND, function(map) { 31 return function() { 32 if(ajaxRequest.xmlHttpRequest.readyState == 4 && ajaxRequest.xmlHttpRequest.status == 200) { 33 var data = eval('(' + ajaxRequest.xmlHttpRequest.responseText + ')'); 34 var coordinates; 35 36 if(map.mapInitialized) { 37 map.gmap.clearOverlays(); 38 for(var i in data) { 39 coordinates = new GLatLng(data[i].lat, data[i].lon); 40 map.gmap.addOverlay(new GMarker(coordinates)); 41 } 42 } else { 43 coordinates = new GLatLng(data[0].lat, data[0].lon); 44 map.setCoordinates(coordinates); 45 map.gmap.clearOverlays(); 46 47 map.update(); 48 map.setEvents(); 49 } 50 } 51 }; 52 }(this)); 53 }; 54 55 this.setEvents = function() { 56 GEvent.addListener(this.gmap, "moveend", function(map) { 57 return function() { 58 map.update(); 59 } 60 }(this)); 61 } 62 }; 63 AjaxMap.prototype = new Map(); 64 65 gmap = new AjaxMap('index.php?page=MapAjax', 'gmap'); 66 gmap.update(); 67 } 68 }); 69 } 70 //]]> 17 //<![CDATA[ 18 if (GMAP_API_KEY != '') { 19 document.write('<script src="http://maps.google.com/maps?file=api&v=2.118&hl={@$this->language->getLanguageCode()}&key=' + GMAP_API_KEY + '&oe={CHARSET}" type="text/javascript"><\/script>'); 20 document.write('<script src="{@RELATIVE_WCF_DIR}js/gmap/ClusterMarker.class.js" type="text/javascript"><\/script>'); 21 document.write('<script src="{@RELATIVE_WCF_DIR}js/gmap/StreetViewControl.class.js" type="text/javascript"><\/script>'); 22 document.write('<script src="{@RELATIVE_WCF_DIR}js/gmap/AjaxMap.class.js" type="text/javascript"><\/script>'); 23 onloadEvents.push(function() { 24 if (GBrowserIsCompatible()) { 25 gmap = new AjaxMap('index.php?page=MapAjax', 'gmap'); 26 gmap.registerEvent(function(map) { 27 return function() { 28 if(GMAP_ENABLE_STREETVIEW) map.gmap.addControl(new StreetViewControl()); 29 } 30 }(gmap)); 31 gmap.update(); 32 } 33 }); 34 } 35 //]]> 71 36 </script> 72 37 </head>
