Skip to content

Commit

Permalink
Removed deprecated GoogleJsAPI
Browse files Browse the repository at this point in the history
No longer used by google api.
  • Loading branch information
netbrain committed Apr 9, 2014
1 parent 10651ca commit 6985b5d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
6 changes: 0 additions & 6 deletions Maps_Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,6 @@

// Integer. Default tilt when using Google Maps.
$GLOBALS['egMapsGMaps3DefaultTilt'] = 0;

// Google JavaScript Loader API key.
// Can be obtained at: https://code.google.com/apis/loader/signup.html
// This key is needed when using Google Earth or when using extended
// limits for displaying maps or geocoding calls.
$GLOBALS['egGoogleJsApiKey'] = '';

// Show points of interest or not.
$GLOBALS['egMapsShowPOI'] = true;
Expand Down
21 changes: 0 additions & 21 deletions includes/services/GoogleMaps3/Maps_GoogleMaps3.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,6 @@ protected function getDependencies() {
}

public static function getApiScript( $langCode, array $urlArgs = array() ) {
global $egGoogleJsApiKey;

$urlArgs = array_merge(
array(
'language' => self::getMappedLanguageCode( $langCode ),
Expand All @@ -291,10 +289,6 @@ public static function getApiScript( $langCode, array $urlArgs = array() ) {
$urlArgs
);

if ( $egGoogleJsApiKey !== '' ) {
$urlArgs['key'] = $egGoogleJsApiKey;
}

return Html::linkedScript( '//maps.googleapis.com/maps/api/js?' . wfArrayToCgi( $urlArgs ) );
}

Expand Down Expand Up @@ -332,19 +326,4 @@ public function getResourceModules() {
array( 'ext.maps.googlemaps3' )
);
}

/**
* Returns a list of all config variables that should be passed to the JS.
*
* @since 1.0.1
*
* @return array
*/
public final function getConfigVariables() {
return parent::getConfigVariables()
+ array(
'egGoogleJsApiKey' => $GLOBALS['egGoogleJsApiKey']
);
}

}
5 changes: 2 additions & 3 deletions includes/services/GoogleMaps3/jquery.googlemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,12 +448,11 @@

this.setup = function () {

var showEarth = $.inArray('earth', options.types) !== -1;
var showEarth = $.inArray('earth', options.types) !== -1 || options.type == 'earth';

// If there are any non-Google KML/KMZ layers, load the geoxml library and use it to add these layers.
if (showEarth) {
this.removeEarthType();
showEarth = mw.config.get('egGoogleJsApiKey') !== '';
}

var mapOptions = {
Expand Down Expand Up @@ -561,7 +560,7 @@

if (showEarth) {
$.getScript(
'https://www.google.com/jsapi?key=' + mw.config.get('egGoogleJsApiKey'),
'https://www.google.com/jsapi',
function (data, textStatus) {
google.load('earth', '1', { callback:function () {
mw.loader.using('ext.maps.gm3.earth', function () {
Expand Down

0 comments on commit 6985b5d

Please sign in to comment.