2 /* This extension creates a map using OpenLayers to show sledrun details and sledrun overviews.
3 This extension depends on no other extension.
9 <wrgmap lat="47.267648" lon="11.40465" zoom="10"/>
11 (Shows icons for all sledruns. lat, lon and zoom are optional.)
17 <wrmap lat="47.2417134" lon="11.21408895" zoom="14" width="700" height="400">
19 <gasthaus name="Rosskogelhütte" wiki="Rosskogelhütte">47.240689 11.190454</gasthaus>
20 <gasthaus name="Stiglreith">47.238186 11.221940</gasthaus>
21 <gasthaus name="Sulzstich">47.240287 11.203006</gasthaus>
22 <parkplatz>47.245789 11.238971</parkplatz>
23 <parkplatz>47.237627 11.218886</parkplatz>
24 <haltestelle name="Oberperfuss Rangger Köpfl Lift">47.245711 11.238283</haltestelle>
25 <achtung name="Kreuzung mit Schipiste">47.2383200 11.2235592</achtung>
103 lat, lon and zoom are optional.
106 $wgExtensionCredits['parserhook'][] = array(
107 'name' => 'Winterrodeln Map',
108 'version' => '3.0.0',
109 'author' =>'Philipp Spitzer',
110 'url' => 'http://www.winterrodeln.org/trac/wiki/WrMap',
111 'description' => 'This extension creates a map using OpenLayers to show sledrun details and sledrun overviews.'
116 $wgResourceModules['ext.wrmap'] = array(
117 'scripts' => array('openlayers/OpenLayers.js', 'wrmap.js'),
118 'styles' => array('openlayers/theme/default/style.css', 'openlayers/theme/default/google.css'),
120 // When your module is loaded, these messages will be available through mw.msg()
121 //'messages' => array( 'myextension-hello-world', 'myextension-goodbye-world' ),
123 // If your scripts need code from other modules, list their identifiers as dependencies
124 // and ResourceLoader will make sure they're loaded before you.
125 // You don't need to manually list 'mediawiki' or 'jquery', which are always loaded.
126 //'dependencies' => array( 'jquery.ui.datepicker' ),
128 // You need to declare the base path of the file paths in 'scripts' and 'styles'
129 'localBasePath' => dirname( __FILE__ ),
131 // ... and the base from the browser as well. For extensions this is made easy,
132 // you can use the 'remoteExtPath' property to declare it relative to where the wiki
133 // has $wgExtensionAssetsPath configured:
134 'remoteExtPath' => 'wrmap',
140 $wgAutoloadClasses['WrMap'] = dirname(__FILE__) . '/wrmap.body.php';
141 $wgAutoloadClasses['WrGMap'] = $wgAutoloadClasses['WrMap'];
144 $wgHooks['ParserFirstCallInit'][] = 'wrMapParserFirstCallInit';
147 function wrMapParserFirstCallInit($parser) {
148 $parser->setHook('wrgmap', 'WrGMap::render');
149 $parser->setHook('wrmap', 'WrMap::render');