Index: trunk/extensions/SlippyMap/SlippyMap.hook.php |
— | — | @@ -37,13 +37,13 @@ |
38 | 38 | // Hook for adding JS variables to <head> |
39 | 39 | $wgHooks['MakeGlobalVariablesScript'][] = array( &$this, 'jsVariables' ); |
40 | 40 | |
41 | | - // Add JavaScript files to <head> |
| 41 | + // Add JavaScript files to <head>, starting with OpenLayers so that it is available in SlippyMap.js |
| 42 | + $wgOut->addScriptFile( $wgScriptPath . '/extensions/SlippyMap/OpenLayers/public/OpenLayers.js?' . $wgStyleVersion ); |
42 | 43 | if ( method_exists( $wgOut, 'addScriptClass' ) ) { |
43 | 44 | $wgOut->addScriptClass( 'SlippyMap' ); |
44 | 45 | } else { |
45 | 46 | $wgOut->addScriptFile( $wgScriptPath . '/extensions/SlippyMap/js/' . $wgSlippyMapJs . '?' . $wgStyleVersion ); |
46 | 47 | } |
47 | | - $wgOut->addScriptFile( $wgScriptPath . '/extensions/SlippyMap/OpenLayers/public/OpenLayers.js?' . $wgStyleVersion ); |
48 | 48 | |
49 | 49 | // Add our CSS to <head> |
50 | 50 | $wgOut->addExtensionStyle( $wgScriptPath . '/extensions/SlippyMap/SlippyMap.css?' . $wgStyleVersion ); |