r83517 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83516‎ | r83517 | r83518 >
Date:08:33, 8 March 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fixed traffic and bike layer js and added support for fusion table layers
Modified paths:
  • /branches/Maps0.8/includes/services/GoogleMaps3/Maps_GoogleMaps3.php (modified) (history)
  • /branches/Maps0.8/includes/services/GoogleMaps3/jquery.googlemap.js (modified) (history)

Diff [purge]

Index: branches/Maps0.8/includes/services/GoogleMaps3/jquery.googlemap.js
@@ -67,6 +67,10 @@
6868 var kmlLayer = new google.maps.KmlLayer( options.kml[i], { map: map } );
6969 }
7070
 71+ for ( i = options.fusiontables.length - 1; i >= 0; i-- ) {
 72+ var ftLayer = new google.maps.FusionTablesLayer( options.fusiontables[i], { map: map } );
 73+ }
 74+
7175 var layerMapping = {
7276 'traffic': 'new google.maps.TrafficLayer()',
7377 'bicycling': 'new google.maps.BicyclingLayer()'
@@ -74,6 +78,7 @@
7579
7680 for ( i = options.layers.length - 1; i >= 0; i-- ) {
7781 var layer = eval( layerMapping[options.layers[i]] );
 82+ layer.setMap( map );
7883 }
7984
8085 var bounds;
Index: branches/Maps0.8/includes/services/GoogleMaps3/Maps_GoogleMaps3.php
@@ -38,7 +38,7 @@
3939 */
4040 protected static $mapLayers = array(
4141 'traffic',
42 - 'bicyling'
 42+ 'bicycling'
4343 );
4444
4545 public static $tyepControlStyles = array(
@@ -120,7 +120,10 @@
121121
122122 $params['kml'] = new ListParameter( 'kml' );
123123 $params['kml']->setDefault( array() );
124 - //$params['kml']->addManipulations( new MapsParamFile() );
 124+ //$params['kml']->addManipulations( new MapsParamFile() );
 125+
 126+ $params['fusiontables'] = new ListParameter( 'fusiontables' );
 127+ $params['fusiontables']->setDefault( array() );
125128 }
126129
127130 /**
@@ -165,7 +168,7 @@
166169 * @return array
167170 */
168171 public static function getLayerNames() {
169 - return array_keys( self::$mapLayers );
 172+ return self::$mapLayers;
170173 }
171174
172175 /**

Status & tagging log