r113944 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113943‎ | r113944 | r113945 >
Date:19:35, 15 March 2012
Author:jeroendedauw
Status:deferred (Comments)
Tags:
Comment:
add option to disable poi
Modified paths:
  • /trunk/extensions/Maps/Maps.i18n.php (modified) (history)
  • /trunk/extensions/Maps/Maps_Settings.php (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
@@ -192,6 +192,7 @@
193193 'maps-googlemaps3-par-fusiontables' => 'IDs of Google Fusion Tables which should be loaded onto the map.',
194194 'maps-googlemaps3-par-tilt' => 'Tilt for the Map when using Google Maps.',
195195 'maps-googlemaps3-par-kmlrezoom' => 'Rezoom the map after the KML layers have been loaded.',
 196+ 'maps-googlemaps3-par-poi' => 'Show points of intesrt.',
196197
197198 // OpenLayers
198199 'maps-openlayers-par-controls' => 'The controls to place on the map.',
Index: trunk/extensions/Maps/Maps_Settings.php
@@ -231,6 +231,9 @@
232232 # Can be obtained at: https://code.google.com/apis/loader/signup.html
233233 # This key is needed when using Google Earth.
234234 $egGoogleJsApiKey = '';
 235+
 236+ # Show points of interest or not.
 237+ $egMapsShowPOI = true;
235238
236239
237240 # Google Maps
Index: trunk/extensions/Maps/includes/services/GoogleMaps3/jquery.googlemap.js
@@ -169,6 +169,17 @@
170170
171171 var map = new google.maps.Map( this.get( 0 ), mapOptions );
172172 this.map = map;
 173+
 174+ if ( options.poi === false ) {
 175+ map.setOptions( { styles: [
 176+ {
 177+ featureType: "poi",
 178+ stylers: [
 179+ { visibility: "off" }
 180+ ]
 181+ }
 182+ ] } );
 183+ }
173184
174185 if ( !options.locations ) {
175186 options.locations = [];
Index: trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_GoogleMaps3.php
@@ -152,6 +152,10 @@
153153 $params['kmlrezoom'] = new Parameter( 'kmlrezoom', Parameter::TYPE_BOOLEAN );
154154 $params['kmlrezoom']->setDefault( $GLOBALS['egMapsRezoomForKML'], false );
155155 $params['kmlrezoom']->setMessage( 'maps-googlemaps3-par-kmlrezoom' );
 156+
 157+ $params['poi'] = new Parameter( 'poi', Parameter::TYPE_BOOLEAN );
 158+ $params['poi']->setDefault( $GLOBALS['egMapsShowPOI'], false );
 159+ $params['poi']->setMessage( 'maps-googlemaps3-par-poi' );
156160 }
157161
158162 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r113945Follow up to r113944;jeroendedauw19:36, 15 March 2012
r114014follow up to r113944, add message docsjeroendedauw14:48, 16 March 2012

Comments

#Comment by Nikerabbit (talk | contribs)   11:10, 16 March 2012

intesrt, please also add message docs.

#Comment by Jeroen De Dauw (talk | contribs)   14:48, 16 March 2012

Typo was already fixed

Status & tagging log