From: philipp Date: Fri, 9 Aug 2013 13:06:09 +0000 (+0000) Subject: The map can handle undefined conditions again. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/mediawiki_extensions/wrmap.git/commitdiff_plain/fffd71c5c59fe085983ad108a5a7374d57b50c93?ds=sidebyside The map can handle undefined conditions again. git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrmap/trunk@1500 7aebc617-e5e2-0310-91dc-80fb5f6d2477 --- diff --git a/wrmap.js b/wrmap.js index c1eab96..86d5bcb 100644 --- a/wrmap.js +++ b/wrmap.js @@ -20,8 +20,10 @@ function init_wrmap(i, jq_map) { var feature = features_all[i]; feature.geometry.transform(EPSG4326, EPSG3857); if (feature.geometry.CLASS_NAME == 'OpenLayers.Geometry.Point') { - if (feature.attributes.type == 'sledrun') features_sledrun.push(feature); - else features_point.push(feature); + if (feature.attributes.type == 'sledrun') { + if (feature.attributes.condition === undefined) feature.attributes.condition = 0; + features_sledrun.push(feature); + } else features_point.push(feature); } else features_path.push(feature); }