Index: trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3.php |
— | — | @@ -24,6 +24,15 @@ |
25 | 25 | |
26 | 26 | $wgHooks['MappingServiceLoad'][] = 'MapsGoogleMaps3::initialize'; |
27 | 27 | |
| 28 | +$wgAutoloadClasses['MapsGoogleMaps3DispMap'] = dirname( __FILE__ ) . '/Maps_GoogleMaps3DispMap.php'; |
| 29 | + |
| 30 | +$egMapsServices[MapsGoogleMaps3::SERVICE_NAME] = array( |
| 31 | + 'aliases' => array( 'google3', 'googlemap3', 'gmap3', 'gmaps3' ), |
| 32 | + 'features' => array( |
| 33 | + 'display_map' => 'MapsGoogleMaps3DispMap', |
| 34 | + ) |
| 35 | +); |
| 36 | + |
28 | 37 | /** |
29 | 38 | * Class for Google Maps v3 initialization. |
30 | 39 | * |
— | — | @@ -37,16 +46,7 @@ |
38 | 47 | |
39 | 48 | public static function initialize() { |
40 | 49 | global $wgAutoloadClasses, $egMapsServices; |
41 | | - |
42 | | - $wgAutoloadClasses['MapsGoogleMaps3DispMap'] = dirname( __FILE__ ) . '/Maps_GoogleMaps3DispMap.php'; |
43 | | - |
44 | | - $egMapsServices[self::SERVICE_NAME] = array( |
45 | | - 'aliases' => array( 'google3', 'googlemap3', 'gmap3', 'gmaps3' ), |
46 | | - 'features' => array( |
47 | | - 'display_map' => 'MapsGoogleMaps3DispMap', |
48 | | - ) |
49 | | - ); |
50 | | - |
| 50 | + |
51 | 51 | self::initializeParams(); |
52 | 52 | |
53 | 53 | Validator::addOutputFormat( 'gmap3type', array( 'MapsGoogleMaps3', 'setGMapType' ) ); |
Index: trunk/extensions/Maps/OpenLayers/Maps_OpenLayers.php |
— | — | @@ -24,6 +24,17 @@ |
25 | 25 | |
26 | 26 | $wgHooks['MappingServiceLoad'][] = 'MapsOpenLayers::initialize'; |
27 | 27 | |
| 28 | +$wgAutoloadClasses['MapsOpenLayersDispMap'] = dirname( __FILE__ ) . '/Maps_OpenLayersDispMap.php'; |
| 29 | +$wgAutoloadClasses['MapsOpenLayersDispPoint'] = dirname( __FILE__ ) . '/Maps_OpenLayersDispPoint.php'; |
| 30 | + |
| 31 | +$egMapsServices[MapsOpenLayers::SERVICE_NAME] = array( |
| 32 | + 'aliases' => array( 'layers', 'openlayer' ), |
| 33 | + 'features' => array( |
| 34 | + 'display_point' => 'MapsOpenLayersDispPoint', |
| 35 | + 'display_map' => 'MapsOpenLayersDispMap', |
| 36 | + ) |
| 37 | +); |
| 38 | + |
28 | 39 | /** |
29 | 40 | * Class for OpenLayers initialization. |
30 | 41 | * |
— | — | @@ -40,17 +51,6 @@ |
41 | 52 | |
42 | 53 | $egMapsOLLoadedLayers = array(); |
43 | 54 | |
44 | | - $wgAutoloadClasses['MapsOpenLayersDispMap'] = dirname( __FILE__ ) . '/Maps_OpenLayersDispMap.php'; |
45 | | - $wgAutoloadClasses['MapsOpenLayersDispPoint'] = dirname( __FILE__ ) . '/Maps_OpenLayersDispPoint.php'; |
46 | | - |
47 | | - $egMapsServices[self::SERVICE_NAME] = array( |
48 | | - 'aliases' => array( 'layers', 'openlayer' ), |
49 | | - 'features' => array( |
50 | | - 'display_point' => 'MapsOpenLayersDispPoint', |
51 | | - 'display_map' => 'MapsOpenLayersDispMap', |
52 | | - ) |
53 | | - ); |
54 | | - |
55 | 55 | self::initializeParams(); |
56 | 56 | |
57 | 57 | Validator::addOutputFormat( 'olgroups', array( __CLASS__, 'unpackLayerGroups' ) ); |
Index: trunk/extensions/Maps/Maps.php |
— | — | @@ -51,6 +51,9 @@ |
52 | 52 | |
53 | 53 | $egMapsStyleVersion = $wgStyleVersion . '-' . Maps_VERSION; |
54 | 54 | |
| 55 | + $egMapsFeatures = array(); |
| 56 | + $egMapsServices = array(); |
| 57 | + |
55 | 58 | // Include the settings file. |
56 | 59 | require_once( $egMapsDir . 'Maps_Settings.php' ); |
57 | 60 | |
— | — | @@ -70,16 +73,13 @@ |
71 | 74 | global $egMapsDefaultService, $egMapsAvailableServices, $egMapsServices, $egMapsDefaultGeoService, $egMapsScriptPath; |
72 | 75 | global $egMapsAvailableGeoServices, $egMapsDir, $egMapsAvailableFeatures, $egMapsUseMinJs, $egMapsJsExt, $egMapsStyleVersion; |
73 | 76 | |
74 | | - $egMapsFeatures = array(); |
75 | | - $egMapsServices = array(); |
76 | | - |
77 | 77 | // Autoload the general classes |
78 | 78 | $wgAutoloadClasses['MapsCoordinateParser'] = $egMapsDir . 'Maps_CoordinateParser.php'; |
79 | 79 | $wgAutoloadClasses['MapsMapFeature'] = $egMapsDir . 'Maps_MapFeature.php'; |
80 | 80 | $wgAutoloadClasses['MapsMapper'] = $egMapsDir . 'Maps_Mapper.php'; |
81 | 81 | |
82 | 82 | wfLoadExtensionMessages( 'Maps' ); |
83 | | - |
| 83 | + |
84 | 84 | wfRunHooks( 'MappingFeatureLoad' ); |
85 | 85 | wfRunHooks( 'MappingServiceLoad' ); |
86 | 86 | |
— | — | @@ -101,7 +101,11 @@ |
102 | 102 | 'path' => __FILE__, |
103 | 103 | 'name' => wfMsg( 'maps_name' ), |
104 | 104 | 'version' => Maps_VERSION, |
105 | | - 'author' => array( '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]', '[http://www.mediawiki.org/wiki/User:Yaron_Koren Yaron Koren]', 'others' ), |
| 105 | + 'author' => array( |
| 106 | + '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]', |
| 107 | + '[http://www.mediawiki.org/wiki/User:Yaron_Koren Yaron Koren]', |
| 108 | + '[http://www.ohloh.net/p/maps/contributors others]' |
| 109 | + ), |
106 | 110 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Maps', |
107 | 111 | 'description' => wfMsgExt( 'maps_desc', 'parsemag', $services_list ), |
108 | 112 | ); |
Index: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php |
— | — | @@ -24,6 +24,17 @@ |
25 | 25 | |
26 | 26 | $wgHooks['MappingServiceLoad'][] = 'MapsGoogleMaps::initialize'; |
27 | 27 | |
| 28 | +$wgAutoloadClasses['MapsGoogleMapsDispMap'] = dirname( __FILE__ ) . '/Maps_GoogleMapsDispMap.php'; |
| 29 | +$wgAutoloadClasses['MapsGoogleMapsDispPoint'] = dirname( __FILE__ ) . '/Maps_GoogleMapsDispPoint.php'; |
| 30 | + |
| 31 | +$egMapsServices[MapsGoogleMaps::SERVICE_NAME] = array( |
| 32 | + 'aliases' => array( 'googlemaps', 'google', 'googlemap', 'gmap', 'gmaps' ), |
| 33 | + 'features' => array( |
| 34 | + 'display_point' => 'MapsGoogleMapsDispPoint', |
| 35 | + 'display_map' => 'MapsGoogleMapsDispMap', |
| 36 | + ) |
| 37 | +); |
| 38 | + |
28 | 39 | /** |
29 | 40 | * Class for Google Maps initialization. |
30 | 41 | * |
— | — | @@ -38,17 +49,6 @@ |
39 | 50 | public static function initialize() { |
40 | 51 | global $wgAutoloadClasses, $egMapsServices; |
41 | 52 | |
42 | | - $wgAutoloadClasses['MapsGoogleMapsDispMap'] = dirname( __FILE__ ) . '/Maps_GoogleMapsDispMap.php'; |
43 | | - $wgAutoloadClasses['MapsGoogleMapsDispPoint'] = dirname( __FILE__ ) . '/Maps_GoogleMapsDispPoint.php'; |
44 | | - |
45 | | - $egMapsServices[self::SERVICE_NAME] = array( |
46 | | - 'aliases' => array( 'googlemaps', 'google', 'googlemap', 'gmap', 'gmaps' ), |
47 | | - 'features' => array( |
48 | | - 'display_point' => 'MapsGoogleMapsDispPoint', |
49 | | - 'display_map' => 'MapsGoogleMapsDispMap', |
50 | | - ) |
51 | | - ); |
52 | | - |
53 | 53 | self::initializeParams(); |
54 | 54 | |
55 | 55 | Validator::addOutputFormat( 'gmaptype', array( __CLASS__, 'setGMapType' ) ); |
Index: trunk/extensions/Maps/YahooMaps/Maps_YahooMaps.php |
— | — | @@ -23,7 +23,18 @@ |
24 | 24 | $wgAutoloadClasses['MapsYahooMaps'] = dirname( __FILE__ ) . '/Maps_YahooMaps.php'; |
25 | 25 | |
26 | 26 | $wgHooks['MappingServiceLoad'][] = 'MapsYahooMaps::initialize'; |
27 | | - |
| 27 | + |
| 28 | +$wgAutoloadClasses['MapsYahooMapsDispMap'] = dirname( __FILE__ ) . '/Maps_YahooMapsDispMap.php'; |
| 29 | +$wgAutoloadClasses['MapsYahooMapsDispPoint'] = dirname( __FILE__ ) . '/Maps_YahooMapsDispPoint.php'; |
| 30 | + |
| 31 | +$egMapsServices[MapsYahooMaps::SERVICE_NAME] = array( |
| 32 | + 'aliases' => array( 'yahoo', 'yahoomap', 'ymap', 'ymaps' ), |
| 33 | + 'features' => array( |
| 34 | + 'display_point' => 'MapsYahooMapsDispPoint', |
| 35 | + 'display_map' => 'MapsYahooMapsDispMap', |
| 36 | + ) |
| 37 | +); |
| 38 | + |
28 | 39 | /** |
29 | 40 | * Class for Yahoo! Maps initialization. |
30 | 41 | * |
— | — | @@ -37,18 +48,7 @@ |
38 | 49 | |
39 | 50 | public static function initialize() { |
40 | 51 | global $wgAutoloadClasses, $egMapsServices; |
41 | | - |
42 | | - $wgAutoloadClasses['MapsYahooMapsDispMap'] = dirname( __FILE__ ) . '/Maps_YahooMapsDispMap.php'; |
43 | | - $wgAutoloadClasses['MapsYahooMapsDispPoint'] = dirname( __FILE__ ) . '/Maps_YahooMapsDispPoint.php'; |
44 | | - |
45 | | - $egMapsServices[self::SERVICE_NAME] = array( |
46 | | - 'aliases' => array( 'yahoo', 'yahoomap', 'ymap', 'ymaps' ), |
47 | | - 'features' => array( |
48 | | - 'display_point' => 'MapsYahooMapsDispPoint', |
49 | | - 'display_map' => 'MapsYahooMapsDispMap', |
50 | | - ) |
51 | | - ); |
52 | | - |
| 52 | + |
53 | 53 | self::initializeParams(); |
54 | 54 | |
55 | 55 | Validator::addOutputFormat( 'ymaptype', array( __CLASS__, 'setYMapType' ) ); |
Index: trunk/extensions/Maps/Maps_Settings.php |
— | — | @@ -27,8 +27,6 @@ |
28 | 28 | # The array element name contains an abbriviation, used for code references, |
29 | 29 | # and in the service data arrays, the value is the human readible version for displaying purpouses. |
30 | 30 | |
31 | | -# Initialization of the mapping features array. |
32 | | - |
33 | 31 | include_once $egMapsDir . 'Geocoders/Maps_Geocoders.php'; // Geocoders |
34 | 32 | include_once $egMapsDir . 'ParserFunctions/Maps_ParserFunctions.php'; // Parser functions |
35 | 33 | |