Completed
Push — initialization ( 43947f...bbe7dd )
by Jeroen De
13:38 queued 11:12
created

GoogleMaps3.php ➔ efMapsInitGoogleMaps3()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * This group contains all Google Maps v3 related files of the Maps extension.
5
 *
6
 * @defgroup MapsGoogleMaps3 Google Maps v3
7
 */
8
9
/**
10
 * This file holds the hook and initialization for the Google Maps v3 service.
11
 *
12
 * @licence GNU GPL v2+
13
 * @author Jeroen De Dauw < [email protected] >
14
 */
15
16
if ( !defined( 'MEDIAWIKI' ) ) {
17
	die( 'Not an entry point.' );
18
}
19
20
call_user_func( function() {
21
	global $wgResourceModules;
22
23
	$pathParts = ( explode( DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR, __DIR__, 2 ) );
24
25
	$wgResourceModules['ext.maps.googlemaps3'] = [
26
		'dependencies' => [ 'ext.maps.common' ],
27
		'localBasePath' => __DIR__,
28
		'remoteExtPath' => end( $pathParts ),
29
		'group' => 'ext.maps',
30
		'targets' => [
31
			'mobile',
32
			'desktop'
33
		],
34
		'scripts' => [
35
			'jquery.googlemap.js',
36
			'ext.maps.googlemaps3.js'
37
		],
38
		'messages' => [
39
			'maps-googlemaps3-incompatbrowser',
40
			'maps-copycoords-prompt',
41
			'maps-searchmarkers-text',
42
			'maps-fullscreen-button',
43
			'maps-fullscreen-button-tooltip',
44
		]
45
	];
46
47
	$wgResourceModules['ext.maps.gm3.markercluster'] = [
48
		'localBasePath' => __DIR__ . '/gm3-util-library',
49
		'remoteExtPath' => end( $pathParts ),
50
		'group' => 'ext.maps',
51
		'targets' => [
52
			'mobile',
53
			'desktop'
54
		],
55
		'scripts' => [
56
			'markerclusterer.js',
57
		],
58
	];
59
60
	$wgResourceModules['ext.maps.gm3.markerwithlabel'] = [
61
		'localBasePath' => __DIR__ . '/gm3-util-library',
62
		'remoteExtPath' => end( $pathParts ),
63
		'group' => 'ext.maps',
64
		'targets' => [
65
			'mobile',
66
			'desktop'
67
		],
68
		'scripts' => [
69
			'markerwithlabel.js',
70
		],
71
		'styles' => [
72
			'markerwithlabel.css',
73
		],
74
	];
75
76
	$wgResourceModules['ext.maps.gm3.geoxml'] = [
77
		'localBasePath' => __DIR__ . '/geoxml3',
78
		'remoteExtPath' => end( $pathParts ),
79
		'group' => 'ext.maps',
80
		'targets' => [
81
			'mobile',
82
			'desktop'
83
		],
84
		'scripts' => [
85
			'geoxml3.js',
86
			'ZipFile.complete.js', //kmz handling
87
			'ProjectedOverlay.js', //Overlay handling
88
		],
89
	];
90
91
	$wgResourceModules['ext.maps.gm3.earth'] = [
92
		'localBasePath' => __DIR__ . '/gm3-util-library',
93
		'remoteExtPath' => end( $pathParts ),
94
		'group' => 'ext.maps',
95
		'targets' => [
96
			'mobile',
97
			'desktop'
98
		],
99
		'scripts' => [
100
			'googleearth-compiled.js',
101
		],
102
	];
103
} );
104