r95666 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95665‎ | r95666 | r95667 >
Date:15:37, 29 August 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added kml rezoom setting and parameter
Modified paths:
  • /trunk/extensions/Maps/Maps.i18n.php (modified) (history)
  • /trunk/extensions/Maps/Maps_Settings.php (modified) (history)
  • /trunk/extensions/Maps/RELEASE-NOTES (modified) (history)
  • /trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_GoogleMaps3.php (modified) (history)
  • /trunk/extensions/Maps/includes/services/GoogleMaps3/jquery.googlemap.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Maps.i18n.php
@@ -190,6 +190,7 @@
191191 'maps-googlemaps3-par-gkml' => 'KML files hosted by Google to load onto the map.',
192192 'maps-googlemaps3-par-fusiontables' => 'IDs of Google Fusion Tables which should be loaded onto the map.',
193193 'maps-googlemaps3-par-tilt' => 'Tilt for the Map when using Google Maps.',
 194+ 'maps-googlemaps3-par-kmlrezoom' => 'Rezoom the map after the KML layers have been loaded.',
194195
195196 // OpenLayers
196197 'maps-openlayers-par-controls' => 'The controls to place on the map.',
Index: trunk/extensions/Maps/Maps_Settings.php
@@ -162,6 +162,8 @@
163163 $egMapsDefaultLabel = '';
164164
165165 $egMapsResizableByDefault = false;
 166+
 167+ $egMapsRezoomForKML = false;
166168
167169
168170
Index: trunk/extensions/Maps/RELEASE-NOTES
@@ -12,6 +12,7 @@
1313
1414 * Added API module for geocoding.
1515 * Added 'geocoding' right.
 16+* Added kmlrezoom parameter for Google Maps v3 and general $egMapsRezoomForKML setting.
1617 * Fixed Google Maps v3 JavaScript issue occuring on MediaWiki 1.17.
1718
1819 === Maps 1.0.2 ===
Index: trunk/extensions/Maps/includes/services/GoogleMaps3/jquery.googlemap.js
@@ -118,7 +118,7 @@
119119 // If there are any non-Google KML/KMZ layers, load the geoxml library and use it to add these layers.
120120 if ( options.kml.length != 0 ) {
121121 mw.loader.using( 'ext.maps.gm3.geoxml', function() {
122 - var geoXml = new geoXML3.parser( { map: map } );
 122+ var geoXml = new geoXML3.parser( { map: map, zoom: options.kmlrezoom } );
123123
124124 for ( i = options.kml.length - 1; i >= 0; i-- ) {
125125 geoXml.parse( options.kml[i] );
Index: trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_GoogleMaps3.php
@@ -148,6 +148,10 @@
149149 $params['tilt'] = new Parameter( 'tilt', Parameter::TYPE_INTEGER );
150150 $params['tilt']->setDefault( $egMapsGMaps3DefaultTilt, false );
151151 $params['tilt']->setMessage( 'maps-googlemaps3-par-tilt' );
 152+
 153+ $params['kmlrezoom'] = new Parameter( 'kmlrezoom', Parameter::TYPE_BOOLEAN );
 154+ $params['kmlrezoom']->setDefault( $GLOBALS['egMapsRezoomForKML'], false );
 155+ $params['kmlrezoom']->setMessage( 'maps-googlemaps3-par-kmlrezoom' );
152156 }
153157
154158 /**