|
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
|
|
|
|