Index: branches/Maps0.8/includes/services/OpenLayers/Maps_ParamOLLayers.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | * @since 0.7 |
31 | 31 | */ |
32 | 32 | public function manipulate( Parameter &$parameter, array &$parameters ) { |
33 | | - global $egMapsOLLayerGroups, $egMapsOLAvailableLayers, $egMapsUseRL; |
| 33 | + global $egMapsOLLayerGroups, $egMapsOLAvailableLayers; |
34 | 34 | |
35 | 35 | $layerDefs = array(); |
36 | 36 | $layerNames = array(); |
— | — | @@ -88,15 +88,9 @@ |
89 | 89 | } |
90 | 90 | } |
91 | 91 | |
92 | | - $parameter->setValue( $egMapsUseRL ? $layerDefs : '[' . implode( ',', $layerDefs ) . ']' ); |
| 92 | + $parameter->setValue( $layerDefs ); |
93 | 93 | |
94 | | - if ( $egMapsUseRL ) { |
95 | | - MapsMappingServices::getServiceInstance( 'openlayers' )->addResourceModules( $this->getModules( $layerNames ) ); |
96 | | - } |
97 | | - else { |
98 | | - MapsMappingServices::getServiceInstance( 'openlayers' )->addLayerDependencies( $this->getDependencies( $layerNames ) ); |
99 | | - } |
100 | | - |
| 94 | + MapsMappingServices::getServiceInstance( 'openlayers' )->addResourceModules( $this->getModules( $layerNames ) ); |
101 | 95 | } |
102 | 96 | |
103 | 97 | /** |
Index: branches/Maps0.8/includes/services/OpenLayers/Maps_OpenLayers.php |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | * @since 0.7 |
33 | 33 | */ |
34 | 34 | public function addParameterInfo( array &$params ) { |
35 | | - global $egMapsOLLayers, $egMapsOLControls, $egMapsUseRL; |
| 35 | + global $egMapsOLLayers, $egMapsOLControls; |
36 | 36 | |
37 | 37 | $params['zoom']->addCriteria( new CriterionInRange( 0, 19 ) ); |
38 | 38 | $params['zoom']->setDefault( self::getDefaultZoom() ); |
— | — | @@ -43,12 +43,6 @@ |
44 | 44 | new ParamManipulationFunctions( 'strtolower' ) |
45 | 45 | ); |
46 | 46 | |
47 | | - if ( !$egMapsUseRL ) { |
48 | | - $params['controls']->addManipulations( |
49 | | - new ParamManipulationImplode( ',', "'" ) |
50 | | - ); |
51 | | - } |
52 | | - |
53 | 47 | $params['layers'] = new ListParameter( 'layers' ); |
54 | 48 | $params['layers']->addManipulations( new MapsParamOLLayers() ); |
55 | 49 | $params['layers']->setDoManipulationOfDefault( true ); |
— | — | @@ -107,27 +101,6 @@ |
108 | 102 | } |
109 | 103 | |
110 | 104 | /** |
111 | | - * @see MapsMappingService::getDependencies |
112 | | - * |
113 | | - * @return array |
114 | | - */ |
115 | | - protected function getDependencies() { |
116 | | - global $egMapsStyleVersion, $egMapsScriptPath, $egMapsUseRL; |
117 | | - |
118 | | - if ( $egMapsUseRL ) { |
119 | | - return array(); |
120 | | - } |
121 | | - else { |
122 | | - return array( |
123 | | - Html::linkedStyle( "$egMapsScriptPath/includes/services/OpenLayers/OpenLayers/theme/default/style.css" ), |
124 | | - Html::linkedScript( "$egMapsScriptPath/includes/services/OpenLayers/OpenLayers/OpenLayers.js?$egMapsStyleVersion" ), |
125 | | - Html::linkedScript( "$egMapsScriptPath/includes/services/OpenLayers/OpenLayerFunctions.js?$egMapsStyleVersion" ), |
126 | | - Html::inlineScript( 'initOLSettings(200, 100); var msgMarkers = ' . Xml::encodeJsVar( wfMsg( 'maps-markers' ) ) . ';' ) |
127 | | - ); |
128 | | - } |
129 | | - } |
130 | | - |
131 | | - /** |
132 | 105 | * Returns the names of all supported controls. |
133 | 106 | * This data is a copy of the one used to actually translate the names |
134 | 107 | * into the controls, since this resides client side, in OpenLayerFunctions.js. |
Index: branches/Maps0.8/includes/services/GoogleMaps/Maps_GoogleMaps.php |
— | — | @@ -211,7 +211,7 @@ |
212 | 212 | */ |
213 | 213 | protected function getDependencies() { |
214 | 214 | global $wgLang; |
215 | | - global $egGoogleMapsKeys, $egGoogleMapsKey, $egMapsStyleVersion, $egMapsScriptPath, $egMapsUseRL; |
| 215 | + global $egGoogleMapsKeys, $egGoogleMapsKey, $egMapsStyleVersion, $egMapsScriptPath; |
216 | 216 | |
217 | 217 | $langCode = self::getMappedLanguageCode( $wgLang->getCode() ); |
218 | 218 | |
— | — | @@ -223,11 +223,6 @@ |
224 | 224 | 'var googleLangCode = '. json_encode( $langCode ) . ';' |
225 | 225 | ); |
226 | 226 | |
227 | | - if ( !$egMapsUseRL ) { |
228 | | - $dependencies[] = Html::linkedScript( "$egMapsScriptPath/includes/services/GoogleMaps/ext.maps.googlemaps2.js?$egMapsStyleVersion" ); |
229 | | - $dependencies[] = Html::inlineScript( 'var msgOverlays = ' . Xml::encodeJsVar( wfMsg( 'maps_overlays' ) ) . ';' ); |
230 | | - } |
231 | | - |
232 | 227 | return $dependencies; |
233 | 228 | } |
234 | 229 | |