]> ToastFreeware Gitweb - philipp/winterrodeln/mediawiki_extensions/wrmap.git/blobdiff - wrmap.body.php
Fixed marker filename generation for non-overview maps.
[philipp/winterrodeln/mediawiki_extensions/wrmap.git] / wrmap.body.php
index 766b1881d0c4d2d230435949c977957b016828cc..c04aaed95329754be7acc68d7c2360b4e0dda3de 100644 (file)
@@ -126,6 +126,8 @@ class WrBaseMap {
                        $properties = array('type' => 'sledrun', 'name' => $title->getText(), 'wiki' => $title->getLocalUrl());
                        if (!is_null($sledrun['date_report'])) $properties['date_report'] = $sledrun['date_report'];
                        if (!is_null($sledrun['condition'])) $properties['condition'] = intval($sledrun['condition']);
+                       $image_url = WrBaseMap::wikipage_to_image($title, 150);
+                       if (!is_null($image_url)) $properties['thumb_url'] = $image_url;
                        $json_feature = array(
                                'type' => 'feature',
                                'geometry' => array(
@@ -277,7 +279,7 @@ class WrBaseMap {
                // Create <div/> element where the map is placed in
                global $wgExtensionAssetsPath;
                $doc = new WrMapDOMDocument();
-               $div = $doc->appendElement('div', array('class' => 'wrmap', 'style' => 'border-style:none;', 'data-img-path' => "$wgExtensionAssetsPath/wrmap/openlayers/img/"));
+               $div = $doc->appendElement('div', array('class' => 'wrmap', 'style' => 'border-style:none;', 'data-ext-path' => "$wgExtensionAssetsPath/wrmap"));
                // progress message
                $div->appendElement('div', array())->appendText('Die Landkarte wird geladen...');
                // data