git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrmap/trunk@1646
7aebc617-e5e2-0310-91dc-
80fb5f6d2477
$lon = floatval($lon);
$title = Title::newFromText($sledrun['page_title']);
$properties = array('type' => 'sledrun', 'name' => $title->getText(), 'wiki' => $title->getLocalUrl());
- if (!is_null($sledrun['date_report'])) $properties[] = $sledrun['date_report'];
- if (!is_null($sledrun['condition'])) $properties[] = intval($sledrun['condition']);
+ if (!is_null($sledrun['date_report'])) $properties['date_report'] = $sledrun['date_report'];
+ if (!is_null($sledrun['condition'])) $properties['condition'] = intval($sledrun['condition']);
$json_feature = array(
'type' => 'feature',
'geometry' => array(
// the following context functions should only be available in the rule that uses them,
// but the rule dependent contexts are ignored by OpenLayers (I think that's a bug)
getCondition: function(feature) {
- if (feature.condition === undefined) return 0;
- return feature.condition;
+ if (feature.attributes.condition === undefined) return 0;
+ return feature.attributes.condition;
},
getSymbol: function(feature) {
var name = feature.attributes.type;