Index: trunk/extensions/Maps/RELEASE-NOTES |
— | — | @@ -14,6 +14,8 @@ |
15 | 15 | |
16 | 16 | * Use of Validator 0.4.10s setMessage method instead of setDescription for better i18n. |
17 | 17 | |
| 18 | +* Fixed zoom parameter for Google Maps v3. |
| 19 | + |
18 | 20 | === Maps 1.0 === |
19 | 21 | (2011-07-19) |
20 | 22 | |
Index: trunk/extensions/Maps/includes/services/GoogleMaps3/jquery.googlemap.js |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | * @author Jeroen De Dauw <jeroendedauw at gmail dot com> |
7 | 7 | */ |
8 | 8 | |
9 | | -(function( $ ){ $.fn.googlemaps = function( options ) { |
| 9 | +(function( $, mw ){ $.fn.googlemaps = function( options ) { |
10 | 10 | |
11 | 11 | /** |
12 | 12 | * All markers that are currently on the map. |
— | — | @@ -147,11 +147,12 @@ |
148 | 148 | for ( var i = markers.length - 1; i >= 0; i-- ) { |
149 | 149 | bounds.extend( markers[i].getPosition() ); |
150 | 150 | } |
151 | | - |
| 151 | + } |
| 152 | + |
| 153 | + if ( options.zoom === false ) { |
152 | 154 | map.fitBounds( bounds ); |
153 | 155 | } |
154 | | - |
155 | | - if ( options.zoom !== false ) { |
| 156 | + else { |
156 | 157 | map.setZoom( options.zoom ); |
157 | 158 | } |
158 | 159 | |
— | — | @@ -186,4 +187,4 @@ |
187 | 188 | |
188 | 189 | return this; |
189 | 190 | |
190 | | -}; })( jQuery ); |
\ No newline at end of file |
| 191 | +}; })( jQuery, window.mediaWiki ); |
\ No newline at end of file |