r61347 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61346‎ | r61347 | r61348 >
Date:00:32, 22 January 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.5.3.
* Google Maps v3 support
Modified paths:
  • /trunk/extensions/Maps/GoogleMaps/GoogleMapFunctions.min.js (modified) (history)
  • /trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php (modified) (history)
  • /trunk/extensions/Maps/GoogleMaps3/GoogleMap3Functions.js (modified) (history)
  • /trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3.php (modified) (history)
  • /trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispMap.php (modified) (history)
  • /trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispPoint.php (modified) (history)
  • /trunk/extensions/Maps/Maps_Settings.php (modified) (history)
  • /trunk/extensions/Maps/YahooMaps/YahooMapFunctions.min.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispPoint.php
@@ -29,10 +29,10 @@
3030 *
3131 */
3232 protected function setMapSettings() {
33 - global $egMapsGoogleMaps3Zoom, $egMapsGoogleMaps3Prefix;
 33+ global $egMapsGMaps3Zoom, $egMapsGMaps3Prefix;
3434
35 - $this->elementNamePrefix = $egMapsGoogleMaps3Prefix;
36 - $this->defaultZoom = $egMapsGoogleMaps3Zoom;
 35+ $this->elementNamePrefix = $egMapsGMaps3Prefix;
 36+ $this->defaultZoom = $egMapsGMaps3Zoom;
3737
3838 $this->markerStringFormat = ''; // TODO
3939
@@ -45,12 +45,12 @@
4646 *
4747 */
4848 protected function doMapServiceLoad() {
49 - global $egGoogleMaps3OnThisPage;
 49+ global $egGMaps3OnThisPage;
5050
5151 MapsGoogleMaps3::addGMap3Dependencies($this->output);
52 - $egGoogleMaps3OnThisPage++;
 52+ $egGMaps3OnThisPage++;
5353
54 - $this->elementNr = $egGoogleMaps3OnThisPage;
 54+ $this->elementNr = $egGMaps3OnThisPage;
5555 }
5656
5757 /**
@@ -62,7 +62,18 @@
6363
6464 // TODO
6565 $this->output .=<<<END
66 -
 66+<div id="$this->mapName" style="width:{$this->width}px; height:{$this->height}px"></div>
 67+<script type="$wgJsMimeType"> /*<![CDATA[*/
 68+addOnloadHook(
 69+ initGMap3("$this->mapName", {
 70+ zoom: $this->zoom,
 71+ lat: $this->centre_lat,
 72+ lon: $this->centre_lon,
 73+ },
 74+ []
 75+ )
 76+);
 77+/*]]>*/ </script>
6778 END;
6879
6980 }
Index: trunk/extensions/Maps/GoogleMaps3/GoogleMap3Functions.js
@@ -7,4 +7,14 @@
88 * @author Jeroen De Dauw
99 */
1010
11 -// TODO
\ No newline at end of file
 11+/**
 12+ * Created a new Map object with the provided properties and markers.
 13+ */
 14+function initGMap3(name, options, markers) {
 15+ options.center = new google.maps.LatLng(options.lat, options.lon);
 16+
 17+ var map = new google.maps.Map(document.getElementById(name), options);
 18+
 19+ map.mapTypes = options.types;
 20+ map.setMapTypeId(options.type);
 21+}
\ No newline at end of file
Index: trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispMap.php
@@ -29,10 +29,10 @@
3030 *
3131 */
3232 protected function setMapSettings() {
33 - global $egMapsGoogleMaps3Zoom, $egMapsGoogleMaps3Prefix;
 33+ global $egMapsGMaps3Zoom, $egMapsGMaps3Prefix;
3434
35 - $this->elementNamePrefix = $egMapsGoogleMaps3Prefix;
36 - $this->defaultZoom = $egMapsGoogleMaps3Zoom;
 35+ $this->elementNamePrefix = $egMapsGMaps3Prefix;
 36+ $this->defaultZoom = $egMapsGMaps3Zoom;
3737
3838 $this->spesificParameters = array(
3939 );
@@ -41,39 +41,38 @@
4242 /**
4343 * @see MapsBaseMap::doMapServiceLoad()
4444 *
45 - */
 45+ */
4646 protected function doMapServiceLoad() {
47 - global $egGoogleMaps3OnThisPage;
 47+ global $egGMaps3OnThisPage;
4848
4949 MapsGoogleMaps3::addGMap3Dependencies($this->output);
50 - $egGoogleMaps3OnThisPage++;
 50+ $egGMaps3OnThisPage++;
5151
52 - $this->elementNr = $egGoogleMaps3OnThisPage;
 52+ $this->elementNr = $egGMaps3OnThisPage;
5353 }
5454
5555 /**
5656 * @see MapsBaseMap::addSpecificMapHTML()
5757 *
58 - */
 58+ */
5959 public function addSpecificMapHTML() {
6060 global $wgJsMimeType;
6161
6262 $this->output .=<<<END
63 -
64 -<div id="$this->mapName" class="$this->class" style="$this->style" ></div>
 63+<div id="$this->mapName" style="width:{$this->width}px; height:{$this->height}px"></div>
6564 <script type="$wgJsMimeType"> /*<![CDATA[*/
6665 addOnloadHook(
67 - function() {
68 - var latlng = new google.maps.LatLng(-34.397, 150.644);
69 - var myOptions = {
70 - zoom: 8,
71 - center: latlng,
72 - mapTypeId: google.maps.MapTypeId.ROADMAP
73 - };
74 - var map = new google.maps.Map(document.getElementById("$this->mapName"), myOptions);
 66+ initGMap3("$this->mapName", {
 67+ zoom: $this->zoom,
 68+ lat: $this->centre_lat,
 69+ lon: $this->centre_lon,
 70+ types: [$this->types],
 71+ type: $this->type,
 72+ },
 73+ []
 74+ )
7575 );
7676 /*]]>*/ </script>
77 -
7877 END;
7978
8079 }
Index: trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3.php
@@ -44,26 +44,89 @@
4545
4646 public static function initialize() {
4747 self::initializeParams();
 48+ Validator::addOutputFormat('gmap3type', array('MapsGoogleMaps3', 'setGMapType'));
 49+ Validator::addOutputFormat('gmap3types', array('MapsGoogleMaps3', 'setGMapTypes'));
4850 }
4951
5052 private static function initializeParams() {
51 - global $egMapsServices;
 53+ global $egMapsServices, $egMapsGMaps3Type, $egMapsGMaps3Types;
5254
 55+ $allowedTypes = self::getTypeNames();
 56+
5357 $egMapsServices[self::SERVICE_NAME]['parameters'] = array(
 58+ 'type' => array(
 59+ 'aliases' => array('map-type', 'map type'),
 60+ 'criteria' => array(
 61+ 'in_array' => $allowedTypes
 62+ ),
 63+ 'default' => $egMapsGMaps3Type, // FIXME: default value should not be used when not present in types parameter.
 64+ 'output-type' => 'gmap3type'
 65+ ),
 66+ 'types' => array(
 67+ 'type' => array('string', 'list'),
 68+ 'aliases' => array('map-types', 'map types'),
 69+ 'criteria' => array(
 70+ 'in_array' => $allowedTypes
 71+ ),
 72+ 'default' => $egMapsGMaps3Types,
 73+ 'output-types' => array('gmap3types', 'list')
 74+ ),
5475 );
5576 }
5677
 78+ private static $mapTypes = array(
 79+ 'normal' => 'ROADMAP',
 80+ 'roadmap' => 'ROADMAP',
 81+ 'satellite' => 'SATELLITE',
 82+ 'hybrid' => 'HYBRID',
 83+ 'terrain' => 'TERRAIN',
 84+ 'physical' => 'TERRAIN'
 85+ );
 86+
5787 /**
 88+ * Returns the names of all supported map types.
 89+ *
 90+ * @return array
 91+ */
 92+ public static function getTypeNames() {
 93+ return array_keys(self::$mapTypes);
 94+ }
 95+
 96+ /**
 97+ * Changes the map type name into the corresponding Google Maps API v3 identifier.
 98+ *
 99+ * @param string $type
 100+ *
 101+ * @return string
 102+ */
 103+ public static function setGMapType(&$type) {
 104+ $type = 'google.maps.MapTypeId.' . self::$mapTypes[ $type ];
 105+ }
 106+
 107+ /**
 108+ * Changes the map type names into the corresponding Google Maps API v3 identifiers.
 109+ *
 110+ * @param array $types
 111+ *
 112+ * @return array
 113+ */
 114+ public static function setGMapTypes(array &$types) {
 115+ for($i = count($types) - 1; $i >= 0; $i--) {
 116+ self::setGMapType($types[$i]);
 117+ }
 118+ }
 119+
 120+ /**
58121 * Add references to the Google Maps API v3 and required JS file to the provided output
59122 *
60123 * @param string $output
61124 */
62125 public static function addGMap3Dependencies(&$output) {
63126 global $wgJsMimeType, $wgLang;
64 - global $egMapsScriptPath, $egGoogleMaps3OnThisPage, $egMapsStyleVersion;
 127+ global $egMapsScriptPath, $egGMaps3OnThisPage, $egMapsStyleVersion;
65128
66 - if (empty($egGoogleMaps3OnThisPage)) {
67 - $egGoogleMaps3OnThisPage = 0;
 129+ if (empty($egGMaps3OnThisPage)) {
 130+ $egGMaps3OnThisPage = 0;
68131
69132 $output .= "<script type='$wgJsMimeType' src='http://maps.google.com/maps/api/js?sensor=false&amp;language={$wgLang->getCode()}'></script><script type='$wgJsMimeType' src='$egMapsScriptPath/GoogleMaps3/GoogleMap3Functions.js?$egMapsStyleVersion'></script>";
70133 }
Index: trunk/extensions/Maps/GoogleMaps/GoogleMapFunctions.min.js
@@ -1 +1,12 @@
2 -var GOverlays=[new GLayer("com.panoramio.all"),new GLayer("com.youtube.all"),new GLayer("org.wikipedia.en"),new GLayer("com.google.webcams")];function createGMarker(point,title,label,icon){var marker;if(icon!=''){var iconObj=new GIcon(G_DEFAULT_ICON);iconObj.image=icon;marker=new GMarker(point,{icon:iconObj});}else{marker=new GMarker(point);}if((title+label).length>0){var bothTxtAreSet=title.length>0&&label.length>0;var popupText=bothTxtAreSet?'<b>'+title+'</b><hr />'+label:title+label;popupText='<div style="overflow:auto;max-height:150px;">'+popupText+'</div>';GEvent.addListener(marker,'click',function(){marker.openInfoWindowHtml(popupText,{maxWidth:350});});}return marker;}function initializeGoogleMap(mapName,mapOptions,markers){if(GBrowserIsCompatible()){mapOptions.centre=(mapOptions.lat!=null&&mapOptions.lon!=null)?new GLatLng(mapOptions.lat,mapOptions.lon):null;mapOptions.size=new GSize(mapOptions.width,mapOptions.height);return createGoogleMap(mapName,mapOptions,markers);}else{return false;}}function createGoogleMap(mapName,mapOptions,markers){var mapElement=document.getElementById(mapName);var typesContainType=false;for(var i=0;i<mapOptions.types.length;i++){if(mapOptions.types[i]==mapOptions.type)typesContainType=true;}if(!typesContainType)mapOptions.types.push(mapOptions.type);var map=new GMap2(mapElement,{size:mapOptions.size,mapTypes:mapOptions.types});map.name=mapName;map.setMapType(mapOptions.type);for(i in mapOptions.controls){if(mapOptions.controls[i].toLowerCase()=='auto'){if(mapOptions.height>75)mapOptions.controls[i]=mapOptions.height>320?'large':'small';}switch(mapOptions.controls[i]){case'large':map.addControl(new GLargeMapControl3D());break;case'small':map.addControl(new GSmallZoomControl3D());break;case'large-original':map.addControl(new GLargeMapControl());break;case'small-original':map.addControl(new GSmallMapControl());break;case'zoom':map.addControl(new GSmallZoomControl());break;case'type':map.addControl(new GMapTypeControl());break;case'type-menu':map.addControl(new GMenuMapTypeControl());break;case'overlays':map.addControl(new MoreControl());break;case'overview':case'overview-map':map.addControl(new GOverviewMapControl());break;case'scale':map.addControl(new GScaleControl());break;case'nav-label':case'nav':map.addControl(new GNavLabelControl());break;}}var bounds=((mapOptions.zoom==null||mapOptions.centre==null)&&markers.length>1)?new GLatLngBounds():null;for(i in markers){var marker=markers[i];map.addOverlay(createGMarker(marker.point,marker.title,marker.label,marker.icon));if(bounds!=null)bounds.extend(marker.point);}if(bounds!=null){map.setCenter(bounds.getCenter(),map.getBoundsZoomLevel(bounds));}if(mapOptions.centre!=null)map.setCenter(mapOptions.centre);if(mapOptions.zoom!=null)map.setZoom(mapOptions.zoom);if(mapOptions.scrollWheelZoom)map.enableScrollWheelZoom();map.enableContinuousZoom();if(!window.GMaps)window.GMaps=new Object;eval("window.GMaps."+mapName+" = map;");return map;}function getGMarkerData(lat,lon,title,label,icon){return{point:new GLatLng(lat,lon),title:title,label:label,icon:icon};}function setupCheckboxShiftClick(){return true;}function MoreControl(){};MoreControl.prototype=new GControl();MoreControl.prototype.initialize=function(map){this.map=map;var more=document.getElementById(map.name+"-outer-more");var buttonDiv=document.createElement("div");buttonDiv.id=map.name+"-more-button";buttonDiv.title="Show/Hide Overlays";buttonDiv.style.border="1px solid black";buttonDiv.style.width="86px";var textDiv=document.createElement("div");textDiv.id=map.name+"-inner-more";textDiv.setAttribute('class','inner-more');textDiv.appendChild(document.createTextNode("Overlays"));buttonDiv.appendChild(textDiv);more.onmouseover=showGLayerbox;more.onmouseout=setGLayerboxClose;more.insertBefore(buttonDiv,document.getElementById(map.name+"-more-box").parentNode);map.getContainer().appendChild(more);return more;};MoreControl.prototype.getDefaultPosition=function(){return new GControlPosition(G_ANCHOR_TOP_RIGHT,new GSize(7,35));};function checkGChecked(mapName){var boxes=document.getElementsByName(mapName+"-overlay-box");for(var i=0;i<boxes.length;i++){if(boxes[i].checked)return true;}return false;}function showGLayerbox(){var mapName=this.id.split('-')[0];eval("if(window.timer_"+mapName+") clearTimeout(timer_"+mapName+");");document.getElementById(mapName+"-more-box").style.display="block";var button=document.getElementById(mapName+"-inner-more");button.style.borderBottomWidth="4px";button.style.borderBottomColor="white";}function setGLayerboxClose(){var mapName=this.id.split('-')[0];var layerbox=document.getElementById(mapName+"-more-box");var button=document.getElementById(mapName+"-inner-more");var bottomColor=checkGChecked(mapName)?"#6495ed":"#c0c0c0";eval("timer_"+mapName+" = window.setTimeout(function() { layerbox.style.display = 'none'; button.style.borderBottomWidth = '1px'; button.style.borderBottomColor = bottomColor; }, 400);");}function switchGLayer(map,checked,layer){var layerbox=document.getElementById(map.name+"-more-box");var button=document.getElementById(map.name+"-inner-more");if(checked){map.addOverlay(layer);}else{map.removeOverlay(layer);}}function initiateGOverlay(elementId,mapName,urlNr){document.getElementById(elementId).checked=true;switchGLayer(GMaps[mapName],true,GOverlays[urlNr]);}
\ No newline at end of file
 2+var GOverlays=[new GLayer("com.panoramio.all"),new GLayer("com.youtube.all"),new GLayer("org.wikipedia.en"),new GLayer("com.google.webcams")];
 3+function createGMarker(b,a,d,c){var e;if(c!=""){var f=new GIcon(G_DEFAULT_ICON);f.image=c;e=new GMarker(b,{icon:f})}else e=new GMarker(b);if((a+d).length>0){var g=(b=a.length>0&&d.length>0)?"<b>"+a+"</b><hr />"+d:a+d;g='<div style="overflow:auto;max-height:150px;">'+g+"</div>";GEvent.addListener(e,"click",function(){e.openInfoWindowHtml(g,{maxWidth:350})})}return e}
 4+function initializeGoogleMap(b,a,d){if(GBrowserIsCompatible()){a.centre=a.lat!=null&&a.lon!=null?new GLatLng(a.lat,a.lon):null;a.size=new GSize(a.width,a.height);return createGoogleMap(b,a,d)}else return false}
 5+function createGoogleMap(b,a,d){for(var c=document.getElementById(b),e=false,f=0;f<a.types.length;f++)if(a.types[f]==a.type)e=true;e||a.types.push(a.type);c=new GMap2(c,{size:a.size,mapTypes:a.types});c.name=b;c.setMapType(a.type);for(f in a.controls){if(a.controls[f].toLowerCase()=="auto")if(a.height>75)a.controls[f]=a.height>320?"large":"small";switch(a.controls[f]){case "large":c.addControl(new GLargeMapControl3D);break;case "small":c.addControl(new GSmallZoomControl3D);break;case "large-original":c.addControl(new GLargeMapControl);
 6+break;case "small-original":c.addControl(new GSmallMapControl);break;case "zoom":c.addControl(new GSmallZoomControl);break;case "type":c.addControl(new GMapTypeControl);break;case "type-menu":c.addControl(new GMenuMapTypeControl);break;case "overlays":c.addControl(new MoreControl);break;case "overview":case "overview-map":c.addControl(new GOverviewMapControl);break;case "scale":c.addControl(new GScaleControl);break;case "nav-label":case "nav":c.addControl(new GNavLabelControl);break}}e=(a.zoom==null||
 7+a.centre==null)&&d.length>1?new GLatLngBounds:null;for(f in d){var g=d[f];c.addOverlay(createGMarker(g.point,g.title,g.label,g.icon));e!=null&&e.extend(g.point)}e!=null&&c.setCenter(e.getCenter(),c.getBoundsZoomLevel(e));a.centre!=null&&c.setCenter(a.centre);a.zoom!=null&&c.setZoom(a.zoom);a.scrollWheelZoom&&c.enableScrollWheelZoom();c.enableContinuousZoom();if(!window.GMaps)window.GMaps={};eval("window.GMaps."+b+" = map;");return c}
 8+function getGMarkerData(b,a,d,c,e){return{point:new GLatLng(b,a),title:d,label:c,icon:e}}function setupCheckboxShiftClick(){return true}function MoreControl(){}MoreControl.prototype=new GControl;
 9+MoreControl.prototype.initialize=function(b){this.map=b;var a=document.getElementById(b.name+"-outer-more"),d=document.createElement("div");d.id=b.name+"-more-button";d.title="Show/Hide Overlays";d.style.border="1px solid black";d.style.width="86px";var c=document.createElement("div");c.id=b.name+"-inner-more";c.setAttribute("class","inner-more");c.appendChild(document.createTextNode("Overlays"));d.appendChild(c);a.onmouseover=showGLayerbox;a.onmouseout=setGLayerboxClose;a.insertBefore(d,document.getElementById(b.name+
 10+"-more-box").parentNode);b.getContainer().appendChild(a);return a};MoreControl.prototype.getDefaultPosition=function(){return new GControlPosition(G_ANCHOR_TOP_RIGHT,new GSize(7,35))};function checkGChecked(b){b=document.getElementsByName(b+"-overlay-box");for(var a=0;a<b.length;a++)if(b[a].checked)return true;return false}
 11+function showGLayerbox(){var b=this.id.split("-")[0];eval("if(window.timer_"+b+") clearTimeout(timer_"+b+");");document.getElementById(b+"-more-box").style.display="block";b=document.getElementById(b+"-inner-more");b.style.borderBottomWidth="4px";b.style.borderBottomColor="white"}
 12+function setGLayerboxClose(){var b=this.id.split("-")[0],a=document.getElementById(b+"-more-box");a=document.getElementById(b+"-inner-more");a=checkGChecked(b)?"#6495ed":"#c0c0c0";eval("timer_"+b+" = window.setTimeout(function() { layerbox.style.display = 'none'; button.style.borderBottomWidth = '1px'; button.style.borderBottomColor = bottomColor; }, 400);")}
 13+function switchGLayer(b,a,d){var c=document.getElementById(b.name+"-more-box");c=document.getElementById(b.name+"-inner-more");a?b.addOverlay(d):b.removeOverlay(d)}function initiateGOverlay(b,a,d){document.getElementById(b).checked=true;switchGLayer(GMaps[a],true,GOverlays[d])};
\ No newline at end of file
Index: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php
@@ -162,7 +162,7 @@
163163 }
164164
165165 /**
166 - * Changes the map type name into the corresponding Google Maps API identifier.
 166+ * Changes the map type name into the corresponding Google Maps API v2 identifier.
167167 *
168168 * @param string $type
169169 *
@@ -173,7 +173,7 @@
174174 }
175175
176176 /**
177 - * Changes the map type names into the corresponding Google Maps API identifiers.
 177+ * Changes the map type names into the corresponding Google Maps API v2 identifiers.
178178 *
179179 * @param array $types
180180 *
Index: trunk/extensions/Maps/YahooMaps/YahooMapFunctions.min.js
@@ -1 +1,3 @@
2 -function createYMarker(geoPoint,title,label,icon){var newMarker;if(icon!=''){newMarker=new YMarker(geoPoint,new YImage(icon));}else{newMarker=new YMarker(geoPoint);}if((title+label).length>0){var bothTxtAreSet=title.length>0&&label.length>0;var markerMarkup=bothTxtAreSet?'<b>'+title+'</b><hr />'+label:title+label;YEvent.Capture(newMarker,EventsList.MouseClick,function(){newMarker.openSmartWindow(markerMarkup);});}return newMarker;}function initializeYahooMap(mapName,lat,lon,zoom,type,types,controls,scrollWheelZoom,markers,height){var centre=(lon!=null&&lat!=null)?new YGeoPoint(lat,lon):null;return createYahooMap(document.getElementById(mapName),centre,zoom,type,types,controls,scrollWheelZoom,markers,height);}function createYahooMap(mapElement,centre,zoom,type,types,controls,scrollWheelZoom,markers,height){var typesContainType=false;for(var i=0;i<types.length;i++){if(types[i]==type)typesContainType=true;}if(!typesContainType)types.push(type);var map=new YMap(mapElement,type);map.removeZoomScale();for(i in controls){if(controls[i].toLowerCase()=='auto-zoom'){if(height>42)controls[i]=height>100?'zoom':'zoom-short';}switch(controls[i]){case'scale':map.addZoomScale();case'type':map.addTypeControl(types);break;case'pan':map.addPanControl();break;case'zoom':map.addZoomLong();break;case'zoom-short':map.addZoomShort();break;}}map.setMapType(type);if(!scrollWheelZoom)map.disableKeyControls();var map_locations=((zoom==null||centre==null)&&markers.length>1)?Array():null;for(i in markers){var marker=markers[i];map.addOverlay(createYMarker(marker.point,marker.title,marker.label,marker.icon));if(map_locations!=null)map_locations.push(marker.point);}if(map_locations!=null){var centerAndZoom=map.getBestZoomAndCenter(map_locations);map.drawZoomAndCenter(centerAndZoom.YGeoPoint,centerAndZoom.zoomLevel);}if(zoom!=null)map.setZoomLevel(zoom);if(centre!=null)map.drawZoomAndCenter(centre);return map;}function getYMarkerData(lat,lon,title,label,icon){return{point:new YGeoPoint(lat,lon),title:title,label:label,icon:icon};}
\ No newline at end of file
 2+function createYMarker(a,d,e,c){var b;b=c!=""?new YMarker(a,new YImage(c)):new YMarker(a);if((d+e).length>0){var g=(a=d.length>0&&e.length>0)?"<b>"+d+"</b><hr />"+e:d+e;YEvent.Capture(b,EventsList.MouseClick,function(){b.openSmartWindow(g)})}return b}function initializeYahooMap(a,d,e,c,b,g,k,h,i,j){d=e!=null&&d!=null?new YGeoPoint(d,e):null;return createYahooMap(document.getElementById(a),d,c,b,g,k,h,i,j)}
 3+function createYahooMap(a,d,e,c,b,g,k,h,i){for(var j=false,f=0;f<b.length;f++)if(b[f]==c)j=true;j||b.push(c);a=new YMap(a,c);a.removeZoomScale();for(f in g){if(g[f].toLowerCase()=="auto-zoom")if(i>42)g[f]=i>100?"zoom":"zoom-short";switch(g[f]){case "scale":a.addZoomScale();case "type":a.addTypeControl(b);break;case "pan":a.addPanControl();break;case "zoom":a.addZoomLong();break;case "zoom-short":a.addZoomShort();break}}a.setMapType(c);k||a.disableKeyControls();c=(e==null||d==null)&&h.length>1?Array():
 4+null;for(f in h){b=h[f];a.addOverlay(createYMarker(b.point,b.title,b.label,b.icon));c!=null&&c.push(b.point)}if(c!=null){h=a.getBestZoomAndCenter(c);a.drawZoomAndCenter(h.YGeoPoint,h.zoomLevel)}e!=null&&a.setZoomLevel(e);d!=null&&a.drawZoomAndCenter(d);return a}function getYMarkerData(a,d,e,c,b){return{point:new YGeoPoint(a,d),title:e,label:c,icon:b}};
\ No newline at end of file
Index: trunk/extensions/Maps/Maps_Settings.php
@@ -153,7 +153,7 @@
154154 # Google Maps
155155
156156 # Your Google Maps API key. Required for displaying Google Maps, and using the Google Geocoder services.
157 -if (empty($egGoogleMapsKey)) $egGoogleMapsKey = ''; # http://code.google.com/apis/maps/signup.html
 157+$egGoogleMapsKey = ''; # http://code.google.com/apis/maps/signup.html
158158
159159 # String. The Google Maps map name prefix. It can not be identical to the one of another mapping service.
160160 $egMapsGoogleMapsPrefix = 'map_google';
@@ -161,7 +161,7 @@
162162 # Integer. The default zoom of a map. This value will only be used when the user does not provide one.
163163 $egMapsGoogleMapsZoom = 14;
164164
165 -# Array of String. The Google Maps default map types. This value will only be used when the user does not provide one.
 165+# Array of String. The Google Maps v2 default map types. This value will only be used when the user does not provide one.
166166 $egMapsGoogleMapsTypes = array('normal', 'satellite', 'hybrid', 'physical');
167167
168168 # String. The default map type. This value will only be used when the user does not provide one.
@@ -171,11 +171,11 @@
172172 # This value will only be used when the user does not provide one.
173173 $egMapsGoogleAutozoom = true;
174174
175 -# Array of String. The default controls for Google Maps. This value will only be used when the user does not provide one.
 175+# Array of String. The default controls for Google Maps v2. This value will only be used when the user does not provide one.
176176 # Available values: auto, large, small, large-original, small-original, zoom, type, type-menu, overview-map, scale, nav-label, overlays
177177 $egMapsGMapControls = array('auto', 'scale', 'type', 'overlays');
178178
179 -# Array. The default overlays for the Google Maps overlays control, and whether they should be shown at pageload.
 179+# Array. The default overlays for the Google Maps v2 overlays control, and whether they should be shown at pageload.
180180 # This value will only be used when the user does not provide one.
181181 # Available values: photos, videos, wikipedia, webcams
182182 $egMapsGMapOverlays = array('photos', 'videos', 'wikipedia', 'webcams');
@@ -185,18 +185,24 @@
186186 # Google Maps v3
187187
188188 # String. The Google Maps v3 map name prefix. It can not be identical to the one of another mapping service.
189 -$egMapsGoogleMaps3Prefix = 'map_google3';
 189+$egMapsGMaps3Prefix = 'map_google3';
190190
191191 # Integer. The default zoom of a map. This value will only be used when the user does not provide one.
192 -$egMapsGoogleMaps3Zoom = 14;
 192+$egMapsGMaps3Zoom = 14;
193193
 194+# Array of String. The Google Maps v3 default map types. This value will only be used when the user does not provide one.
 195+$egMapsGMaps3Types = array('roadmap', 'satellite', 'hybrid', 'terrain');
194196
 197+# String. The default map type. This value will only be used when the user does not provide one.
 198+$egMapsGMaps3Type = 'roadmap';
195199
 200+
 201+
196202 # Yahoo! Maps
197203
198204 # Your Yahoo! Maps API key. Required for displaying Yahoo! Maps.
199205 # Haven't got an API key yet? Get it here: https://developer.yahoo.com/wsregapp/
200 -if (empty($egYahooMapsKey)) $egYahooMapsKey = '';
 206+$egYahooMapsKey = '';
201207
202208 # String. The Yahoo! maps map name prefix. It can not be identical to the one of another mapping service.
203209 $egMapsYahooMapsPrefix = 'map_yahoo';

Status & tagging log