https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113944
Revision: 113944
Author: jeroendedauw
Date: 2012-03-15 19:35:17 +0000 (Thu, 15 Mar 2012)
Log Message:
-----------
add option to disable poi
Modified Paths:
--------------
trunk/extensions/Maps/Maps.i18n.php
trunk/extensions/Maps/Maps_Settings.php
trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_GoogleMaps3.php
trunk/extensions/Maps/includes/services/GoogleMaps3/jquery.googlemap.js
Modified: trunk/extensions/Maps/Maps.i18n.php
===================================================================
--- trunk/extensions/Maps/Maps.i18n.php 2012-03-15 18:15:36 UTC (rev 113943)
+++ trunk/extensions/Maps/Maps.i18n.php 2012-03-15 19:35:17 UTC (rev 113944)
@@ -192,6 +192,7 @@
'maps-googlemaps3-par-fusiontables' => 'IDs of Google Fusion Tables
which should be loaded onto the map.',
'maps-googlemaps3-par-tilt' => 'Tilt for the Map when using Google
Maps.',
'maps-googlemaps3-par-kmlrezoom' => 'Rezoom the map after the KML
layers have been loaded.',
+ 'maps-googlemaps3-par-poi' => 'Show points of intesrt.',
// OpenLayers
'maps-openlayers-par-controls' => 'The controls to place on the map.',
Modified: trunk/extensions/Maps/Maps_Settings.php
===================================================================
--- trunk/extensions/Maps/Maps_Settings.php 2012-03-15 18:15:36 UTC (rev
113943)
+++ trunk/extensions/Maps/Maps_Settings.php 2012-03-15 19:35:17 UTC (rev
113944)
@@ -231,6 +231,9 @@
# Can be obtained at:
https://code.google.com/apis/loader/signup.html
# This key is needed when using Google Earth.
$egGoogleJsApiKey = '';
+
+ # Show points of interest or not.
+ $egMapsShowPOI = true;
# Google Maps
Modified:
trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_GoogleMaps3.php
===================================================================
--- trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_GoogleMaps3.php
2012-03-15 18:15:36 UTC (rev 113943)
+++ trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_GoogleMaps3.php
2012-03-15 19:35:17 UTC (rev 113944)
@@ -152,6 +152,10 @@
$params['kmlrezoom'] = new Parameter( 'kmlrezoom',
Parameter::TYPE_BOOLEAN );
$params['kmlrezoom']->setDefault(
$GLOBALS['egMapsRezoomForKML'], false );
$params['kmlrezoom']->setMessage(
'maps-googlemaps3-par-kmlrezoom' );
+
+ $params['poi'] = new Parameter( 'poi', Parameter::TYPE_BOOLEAN
);
+ $params['poi']->setDefault( $GLOBALS['egMapsShowPOI'], false );
+ $params['poi']->setMessage( 'maps-googlemaps3-par-poi' );
}
/**
Modified:
trunk/extensions/Maps/includes/services/GoogleMaps3/jquery.googlemap.js
===================================================================
--- trunk/extensions/Maps/includes/services/GoogleMaps3/jquery.googlemap.js
2012-03-15 18:15:36 UTC (rev 113943)
+++ trunk/extensions/Maps/includes/services/GoogleMaps3/jquery.googlemap.js
2012-03-15 19:35:17 UTC (rev 113944)
@@ -169,6 +169,17 @@
var map = new google.maps.Map( this.get( 0 ), mapOptions );
this.map = map;
+
+ if ( options.poi === false ) {
+ map.setOptions( { styles: [
+ {
+ featureType: "poi",
+ stylers: [
+ { visibility: "off" }
+ ]
+ }
+ ] } );
+ }
if ( !options.locations ) {
options.locations = [];
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs