Index: branches/Maps0.8/Maps_Settings.php |
— | — | @@ -21,8 +21,6 @@ |
22 | 22 | |
23 | 23 | |
24 | 24 | |
25 | | -$egMapsUseRL = false; //method_exists( 'OutputPage', 'addModules' ); |
26 | | - |
27 | 25 | # Features configuration |
28 | 26 | # Commenting out the inclusion of any feature will make Maps completely ignore it, and so improve performance. |
29 | 27 | |
— | — | @@ -112,7 +110,7 @@ |
113 | 111 | # service is present in the $egMapsDefaultServices array for a certain feature. |
114 | 112 | # A service that supports all features is recommended. This service needs to be |
115 | 113 | # enabled, if not, the first one from the available services will be taken. |
116 | | - $egMapsDefaultService = 'googlemaps2'; |
| 114 | + $egMapsDefaultService = 'googlemaps3'; |
117 | 115 | |
118 | 116 | # Array of String. The default mapping service for each feature, which will be |
119 | 117 | # used when no valid service is provided by the user. Each service needs to be |
Index: branches/Maps0.8/includes/services/GoogleMaps3/Maps_GoogleMaps3DispPoint.php |
— | — | @@ -13,11 +13,11 @@ |
14 | 14 | /** |
15 | 15 | * @see MapsBasePointMap::getMapHTML() |
16 | 16 | */ |
17 | | - public function getMapHTML( array $params, Parser $parser ) { |
| 17 | + public function getMapHTML( array $params, Parser $parser, $mapName ) { |
18 | 18 | return Html::element( |
19 | 19 | 'div', |
20 | 20 | array( |
21 | | - 'id' => $this->service->getMapId(), |
| 21 | + 'id' => $mapName, |
22 | 22 | 'style' => "width: {$params['width']}; height: {$params['height']}; background-color: #cccccc; overflow: hidden;", |
23 | 23 | ), |
24 | 24 | wfMsg( 'maps-loading-map' ) |
Index: branches/Maps0.8/includes/services/GoogleMaps3/jquery.googlemap.js |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +(function( $ ){ $.fn.googlemaps = function() { |
| 3 | + |
| 4 | + this.fadeOut( 'normal', function( options ) { |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + }); |
| 9 | + |
| 10 | + return this; |
| 11 | + |
| 12 | +}; })( jQuery ); |
\ No newline at end of file |
Property changes on: branches/Maps0.8/includes/services/GoogleMaps3/jquery.googlemap.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Index: branches/Maps0.8/includes/services/GoogleMaps3/Maps_GoogleMaps3DispMap.php |
— | — | @@ -12,11 +12,11 @@ |
13 | 13 | /** |
14 | 14 | * @see MapsBaseMap::getMapHTML() |
15 | 15 | */ |
16 | | - public function getMapHTML( array $params, Parser $parser ) { |
| 16 | + public function getMapHTML( array $params, Parser $parser, $mapName ) { |
17 | 17 | return Html::element( |
18 | 18 | 'div', |
19 | 19 | array( |
20 | | - 'id' => $this->service->getMapId(), |
| 20 | + 'id' => $mapName, |
21 | 21 | 'style' => "width: {$params['width']}; height: {$params['height']}; background-color: #cccccc; overflow: hidden;", |
22 | 22 | ), |
23 | 23 | wfMsg( 'maps-loading-map' ) |
Index: branches/Maps0.8/includes/services/GoogleMaps3/GoogleMaps3.php |
— | — | @@ -20,6 +20,23 @@ |
21 | 21 | die( 'Not an entry point.' ); |
22 | 22 | } |
23 | 23 | |
| 24 | +$wgResourceModules['ext.maps.googlemaps3'] = array( |
| 25 | + 'dependencies' => array( 'ext.maps.common' ), |
| 26 | + 'localBasePath' => dirname( __FILE__ ), |
| 27 | + 'remoteBasePath' => $egMapsScriptPath . '/includes/services/GoogleMaps3', |
| 28 | + 'group' => 'ext.maps', |
| 29 | + 'scripts' => array( |
| 30 | + 'jquery.googlemaps.js', |
| 31 | + 'ext.maps.googlemaps3.js', |
| 32 | + ),/* |
| 33 | + 'styles' => array( |
| 34 | + 'ext.maps.googlemaps2.css', |
| 35 | + ),*/ |
| 36 | + 'messages' => array( |
| 37 | + 'maps-googlemaps3-incompatbrowser' |
| 38 | + ) |
| 39 | +); |
| 40 | + |
24 | 41 | $wgHooks['MappingServiceLoad'][] = 'efMapsInitGoogleMaps3'; |
25 | 42 | |
26 | 43 | /** |
Index: branches/Maps0.8/includes/services/GoogleMaps3/Maps_GoogleMaps3.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | function __construct( $serviceName ) { |
23 | 23 | parent::__construct( |
24 | 24 | $serviceName, |
25 | | - array( 'google3', 'googlemap3', 'gmap3', 'gmaps3' ) |
| 25 | + array( 'googlemaps', 'google' ) |
26 | 26 | ); |
27 | 27 | } |
28 | 28 | |
— | — | @@ -129,8 +129,8 @@ |
130 | 130 | $languageCode = self::getMappedLanguageCode( $wgLang->getCode() ); |
131 | 131 | |
132 | 132 | return array( |
133 | | - Html::linkedScript( "http://maps.google.com/maps/api/js?sensor=false&language=$languageCode" ), |
134 | | - Html::linkedScript( "$egMapsScriptPath/includes/services/GoogleMaps3/GoogleMap3Functions.js?$egMapsStyleVersion" ), |
| 133 | + //Html::linkedScript( "http://maps.google.com/maps/api/js?sensor=false&language=$languageCode" ), |
| 134 | + //Html::linkedScript( "$egMapsScriptPath/includes/services/GoogleMaps3/GoogleMap3Functions.js?$egMapsStyleVersion" ), |
135 | 135 | ); |
136 | 136 | } |
137 | 137 | |
Index: branches/Maps0.8/includes/services/GoogleMaps3/ext.maps.googlemaps3.js |
— | — | @@ -0,0 +1,25 @@ |
| 2 | +/** |
| 3 | + * JavasSript for Google Maps v3 maps in the Maps extension. |
| 4 | + * @see http://www.mediawiki.org/wiki/Extension:Maps |
| 5 | + * |
| 6 | + * @author Jeroen De Dauw <jeroendedauw at gmail dot com> |
| 7 | + */ |
| 8 | + |
| 9 | +jQuery.getScript( |
| 10 | + 'http://maps.google.com/maps/api/js?sensor=false', |
| 11 | + function () { |
| 12 | + if ( true ) { |
| 13 | + for ( i in window.maps.googlemaps3 ) { |
| 14 | + jQuery( '#' + i ).googlemaps( window.maps.googlemaps3[i] ); |
| 15 | + } |
| 16 | + } |
| 17 | + else { |
| 18 | + alert( mediaWiki.msg( 'maps-googlemaps3-incompatbrowser' ) ); |
| 19 | + |
| 20 | + for ( i in window.maps.googlemaps3 ) { |
| 21 | + jQuery( '#' + i ).text( mediaWiki.msg( 'maps-load-failed' ) ); |
| 22 | + } |
| 23 | + } |
| 24 | + } |
| 25 | +); |
| 26 | + |
Property changes on: branches/Maps0.8/includes/services/GoogleMaps3/ext.maps.googlemaps3.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 27 | + native |
Index: branches/Maps0.8/includes/services/YahooMaps/Maps_YahooMapsDispPoint.php |
— | — | @@ -13,11 +13,11 @@ |
14 | 14 | /** |
15 | 15 | * @see MapsBasePointMap::getMapHTML() |
16 | 16 | */ |
17 | | - public function getMapHTML( array $params, Parser $parser ) { |
| 17 | + public function getMapHTML( array $params, Parser $parser, $mapName ) { |
18 | 18 | return Html::element( |
19 | 19 | 'div', |
20 | 20 | array( |
21 | | - 'id' => $this->service->getMapId(), |
| 21 | + 'id' => $mapName, |
22 | 22 | 'style' => "width: {$params['width']}; height: {$params['height']}; background-color: #cccccc; overflow: hidden;", |
23 | 23 | ), |
24 | 24 | wfMsg( 'maps-loading-map' ) |
Index: branches/Maps0.8/includes/services/YahooMaps/Maps_YahooMapsDispMap.php |
— | — | @@ -13,11 +13,11 @@ |
14 | 14 | /** |
15 | 15 | * @see MapsBaseMap::getMapHTML() |
16 | 16 | */ |
17 | | - public function getMapHTML( array $params, Parser $parser ) { |
| 17 | + public function getMapHTML( array $params, Parser $parser, $mapName ) { |
18 | 18 | return Html::element( |
19 | 19 | 'div', |
20 | 20 | array( |
21 | | - 'id' => $this->service->getMapId(), |
| 21 | + 'id' => $mapName, |
22 | 22 | 'style' => "width: {$params['width']}; height: {$params['height']}; background-color: #cccccc; overflow: hidden;", |
23 | 23 | ), |
24 | 24 | wfMsg( 'maps-loading-map' ) |
Index: branches/Maps0.8/includes/services/OpenLayers/Maps_OpenLayersDispPoint.php |
— | — | @@ -13,11 +13,11 @@ |
14 | 14 | /** |
15 | 15 | * @see MapsBasePointMap::getMapHTML() |
16 | 16 | */ |
17 | | - public function addSpecificMapHTML( array $params, Parser $parser ) { |
| 17 | + public function addSpecificMapHTML( array $params, Parser $parser, $mapName ) { |
18 | 18 | return Html::element( |
19 | 19 | 'div', |
20 | 20 | array( |
21 | | - 'id' => $this->service->getMapId(), |
| 21 | + 'id' => $mapName, |
22 | 22 | 'style' => "width: {$params['width']}; height: {$params['height']}; background-color: #cccccc; overflow: hidden;", |
23 | 23 | ), |
24 | 24 | wfMsg( 'maps-loading-map' ) |
Index: branches/Maps0.8/includes/services/OpenLayers/Maps_OpenLayersDispMap.php |
— | — | @@ -30,11 +30,11 @@ |
31 | 31 | /** |
32 | 32 | * @see MapsBaseMap::getMapHTML |
33 | 33 | */ |
34 | | - public function getMapHTML( array $params, Parser $parser ) { |
| 34 | + public function getMapHTML( array $params, Parser $parser, $mapName ) { |
35 | 35 | return Html::element( |
36 | 36 | 'div', |
37 | 37 | array( |
38 | | - 'id' => $this->service->getMapId(), |
| 38 | + 'id' => $mapName, |
39 | 39 | 'style' => "width: {$params['width']}; height: {$params['height']}; background-color: #cccccc; overflow: hidden;", |
40 | 40 | ), |
41 | 41 | wfMsg( 'maps-loading-map' ) |
Index: branches/Maps0.8/includes/services/GoogleMaps/GoogleMaps.php |
— | — | @@ -67,4 +67,4 @@ |
68 | 68 | $googleMaps->addFeature( 'display_map', 'MapsGoogleMapsDispMap' ); |
69 | 69 | |
70 | 70 | return true; |
71 | | -} |
\ No newline at end of file |
| 71 | +} |
Index: branches/Maps0.8/includes/services/GoogleMaps/Maps_GoogleMaps.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | function __construct( $serviceName ) { |
35 | 35 | parent::__construct( |
36 | 36 | $serviceName, |
37 | | - array( 'googlemaps', 'google', 'googlemap', 'gmap', 'gmaps' ) |
| 37 | + array( 'googlemaps2', 'google2', 'gmap', 'gmaps' ) |
38 | 38 | ); |
39 | 39 | } |
40 | 40 | |
Index: branches/Maps0.8/includes/services/GoogleMaps/ext.maps.googlemaps2.js |
— | — | @@ -47,7 +47,6 @@ |
48 | 48 | alert( mediaWiki.msg( 'maps-googlemaps2-incompatbrowser' ) ); |
49 | 49 | |
50 | 50 | for ( i in window.maps.googlemaps2 ) { |
51 | | - // FIXME: common module with message not getting loaded for some reason |
52 | 51 | jQuery( '#' + i ).text( mediaWiki.msg( 'maps-load-failed' ) ); |
53 | 52 | } |
54 | 53 | } |
Index: branches/Maps0.8/includes/services/OSM/Maps_OSMDispMap.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | /** |
17 | 17 | * @see MapsBaseMap::getMapHTML() |
18 | 18 | */ |
19 | | - public function getMapHTML( array $params, Parser $parser ) { |
| 19 | + public function getMapHTML( array $params, Parser $parser, $mapName ) { |
20 | 20 | global $wgLang; |
21 | 21 | |
22 | 22 | $thumbs = $params['thumbs'] ? 'yes' : 'no'; |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | return Html::element( |
28 | 28 | 'iframe', |
29 | 29 | array( |
30 | | - 'id' => $this->service->getMapId(), |
| 30 | + 'id' => $mapName, |
31 | 31 | 'style' => "width: {$params['width']}; height: {$params['height']}; clear: both;", |
32 | 32 | 'src' => "http://toolserver.org/~kolossos/openlayers/kml-on-ol.php?zoom={$params['zoom']}&lat={$params['centre']['lat']}&lon={$params['centre']['lon']}&lang=$lang&thumbs=$thumbs&photo=$photos" |
33 | 33 | ), |