Index: trunk/extensions/Maps/Maps.php |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | die( '<b>Error:</b> You need to have <a href="http://www.mediawiki.org/wiki/Extension:Validator">Validator</a> installed in order to use <a href="http://www.mediawiki.org/wiki/Extension:Maps">Maps</a>.<br />' ); |
38 | 38 | } |
39 | 39 | else { |
40 | | - define( 'Maps_VERSION', '0.7.5.1' ); |
| 40 | + define( 'Maps_VERSION', '0.7.6 alpha' ); |
41 | 41 | |
42 | 42 | // The different coordinate notations. |
43 | 43 | define( 'Maps_COORDS_FLOAT', 'float' ); |
Index: trunk/extensions/Maps/Maps_Settings.php |
— | — | @@ -405,32 +405,7 @@ |
406 | 406 | 'osm' => array( 'osmarender', 'osm-mapnik', 'osm-cyclemap' ), |
407 | 407 | ); |
408 | 408 | |
409 | | - # Layer dependencie (MediaWiki >= 1.17). |
410 | | - // http://maps.google.com/maps/api/js?sensor=false |
411 | | - $egMapsOLLayerModules = array(/* |
412 | | - 'ext.maps.ol.osm' => array( |
413 | | - 'scripts' => array( |
414 | | - 'OSM/OpenStreetMap.js', |
415 | | - ), |
416 | | - ), |
417 | | - 'ext.maps.ol.yahoo' => array( |
418 | | - 'scripts' => array( |
419 | | - 'http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzuro-openlayers', |
420 | | - ), |
421 | | - ), |
422 | | - 'ext.maps.ol.bing' => array( |
423 | | - 'scripts' => array( |
424 | | - 'http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1', |
425 | | - ), |
426 | | - ), |
427 | | - 'ext.maps.ol.ol-wms' => array( |
428 | | - 'scripts' => array( |
429 | | - 'http://clients.multimap.com/API/maps/1.1/metacarta_04', |
430 | | - ), |
431 | | - ) |
432 | | - */); |
433 | | - |
434 | | - # Layer dependencies (MediaWiki < 1.17). |
| 409 | + # Layer dependencies |
435 | 410 | $egMapsOLLayerDependencies = array( |
436 | 411 | 'yahoo' => "<style type='text/css'> #controls {width: 512px;}</style><script src='http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzuro-openlayers'></script>", |
437 | 412 | 'bing' => "<script type='$wgJsMimeType' src='http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1'></script>", |
Index: trunk/extensions/Maps/includes/services/OpenLayers/Maps_ParamOLLayers.php |
— | — | @@ -90,12 +90,7 @@ |
91 | 91 | |
92 | 92 | $parameter->setValue( $egMapsUseRL ? $layerDefs : '[' . implode( ',', $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 | | - } |
| 94 | + MapsMappingServices::getServiceInstance( 'openlayers' )->addLayerDependencies( $this->getDependencies( $layerNames ) ); |
100 | 95 | |
101 | 96 | } |
102 | 97 | |
— | — | @@ -125,30 +120,4 @@ |
126 | 121 | return array_unique( $layerDependencies ); |
127 | 122 | } |
128 | 123 | |
129 | | - /** |
130 | | - * Returns the names of the resource modules for the provided layers. |
131 | | - * |
132 | | - * @since 0.7.3 |
133 | | - * |
134 | | - * @param array $layerNames |
135 | | - * |
136 | | - * @return array |
137 | | - */ |
138 | | - protected function getModules( array $layerNames ) { |
139 | | - global $egMapsOLLayerModules, $egMapsOLAvailableLayers; |
140 | | - |
141 | | - $moduleNames = array(); |
142 | | - |
143 | | - foreach ( $layerNames as $layerName ) { |
144 | | - if ( array_key_exists( $layerName, $egMapsOLAvailableLayers ) // The layer must be defined in php |
145 | | - && is_array( $egMapsOLAvailableLayers[$layerName] ) // The layer must be an array... |
146 | | - && count( $egMapsOLAvailableLayers[$layerName] ) > 1 // ...with a second element... |
147 | | - && array_key_exists( 'ext.maps.ol.' . $egMapsOLAvailableLayers[$layerName][1], $egMapsOLLayerModules ) ) { //...that is a dependency. |
148 | | - $moduleNames[] = 'ext.maps.ol.' . $egMapsOLAvailableLayers[$layerName][1]; |
149 | | - } |
150 | | - } |
151 | | - |
152 | | - return array_unique( $moduleNames ); |
153 | | - } |
154 | | - |
155 | 124 | } |
\ No newline at end of file |