r83695 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83694‎ | r83695 | r83696 >
Date:13:10, 11 March 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
moved api specific stuff to the jquery plugin, where it should have been
Modified paths:
  • /branches/Maps0.8/includes/services/GoogleMaps3/Maps_ParamGMap3Type.php (modified) (history)
  • /branches/Maps0.8/includes/services/GoogleMaps3/Maps_ParamGMap3Typestyle.php (modified) (history)
  • /branches/Maps0.8/includes/services/GoogleMaps3/Maps_ParamGMap3Zoomstyle.php (modified) (history)
  • /branches/Maps0.8/includes/services/GoogleMaps3/jquery.googlemap.js (modified) (history)

Diff [purge]

Index: branches/Maps0.8/includes/services/GoogleMaps3/Maps_ParamGMap3Type.php
@@ -15,21 +15,12 @@
1616 class MapsParamGMap3Type extends ItemParameterManipulation {
1717
1818 /**
19 - * Constructor.
20 - *
21 - * @since 0.7
22 - */
23 - public function __construct() {
24 - parent::__construct();
25 - }
26 -
27 - /**
2819 * @see ItemParameterManipulation::doManipulation
2920 *
3021 * @since 0.7
3122 */
3223 public function doManipulation( &$value, Parameter $parameter, array &$parameters ) {
33 - $value = 'google.maps.MapTypeId.' . MapsGoogleMaps3::$mapTypes[strtolower( $value )];
 24+ $value = MapsGoogleMaps3::$mapTypes[strtolower( $value )];
3425 }
3526
3627 }
\ No newline at end of file
Index: branches/Maps0.8/includes/services/GoogleMaps3/Maps_ParamGMap3Typestyle.php
@@ -15,21 +15,12 @@
1616 class MapsParamGMap3Typestyle extends ItemParameterManipulation {
1717
1818 /**
19 - * Constructor.
20 - *
21 - * @since 0.7
22 - */
23 - public function __construct() {
24 - parent::__construct();
25 - }
26 -
27 - /**
2819 * @see ItemParameterManipulation::doManipulation
2920 *
30 - * @since 0.7
 21+ * @since 0.8
3122 */
3223 public function doManipulation( &$value, Parameter $parameter, array &$parameters ) {
33 - $value = 'google.maps.MapTypeControlStyle.' . MapsGoogleMaps3::$tyepControlStyles[strtolower( $value )];
 24+ $value = MapsGoogleMaps3::$tyepControlStyles[strtolower( $value )];
3425 }
3526
3627 }
\ No newline at end of file
Index: branches/Maps0.8/includes/services/GoogleMaps3/jquery.googlemap.js
@@ -9,7 +9,7 @@
1010
1111 var mapOptions = {
1212 disableDefaultUI: true,
13 - mapTypeId: eval( options.type ),
 13+ mapTypeId: eval( 'google.maps.MapTypeId.' + options.type ),
1414 };
1515 this.options = options;
1616
@@ -21,8 +21,8 @@
2222 mapOptions.streetViewControl = $.inArray( 'streetview', options.controls ) != -1;
2323
2424 // Map control styles
25 - mapOptions.zoomControlOptions = { style: eval( options.zoomstyle ) }
26 - mapOptions.mapTypeControlOptions = { style: eval( options.typestyle ) }
 25+ mapOptions.zoomControlOptions = { style: eval( 'google.maps.ZoomControlStyle.' + options.zoomstyle ) }
 26+ mapOptions.mapTypeControlOptions = { style: eval( 'google.maps.MapTypeControlStyle.' + options.typestyle ) }
2727
2828 // Create the map.
2929 var locations = options.locations;
Index: branches/Maps0.8/includes/services/GoogleMaps3/Maps_ParamGMap3Zoomstyle.php
@@ -15,21 +15,12 @@
1616 class MapsParamGMap3Zoomstyle extends ItemParameterManipulation {
1717
1818 /**
19 - * Constructor.
20 - *
21 - * @since 0.7
22 - */
23 - public function __construct() {
24 - parent::__construct();
25 - }
26 -
27 - /**
2819 * @see ItemParameterManipulation::doManipulation
2920 *
30 - * @since 0.7
 21+ * @since 0.8
3122 */
3223 public function doManipulation( &$value, Parameter $parameter, array &$parameters ) {
33 - $value = 'google.maps.ZoomControlStyle.' . strtoupper( $value );
 24+ $value = strtoupper( $value );
3425 }
3526
3627 }
\ No newline at end of file

Status & tagging log