summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/Maps/resources/GoogleMaps/ext.maps.googlemaps3.js
blob: ce5880c2e3f52be077be3b5ef0201fc7b9e5afd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
 * JavaScript for Google Maps v3 maps in the Maps extension.
 * @see https://www.mediawiki.org/wiki/Extension:Maps
 *
 * @licence GNU GPL v2+
 * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
 */
(function( $, mw ) {

	$( document ).ready( function() {

		if ( typeof google === 'undefined' ) {
			$( '.maps-googlemaps3' ).text( mw.msg( 'maps-googlemaps3-incompatbrowser' ) );
		}
		else {
			$( '.maps-googlemaps3' ).each( function() {
				var $this = $( this );
				var map = $this.googlemaps( $.parseJSON( $this.find( 'div').text() ) );
				window.maps.googlemapsList.push(map);
			} );
		}

	} );

})( window.jQuery, mediaWiki );