The map can handle undefined conditions again.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Fri, 9 Aug 2013 13:06:09 +0000 (13:06 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Fri, 9 Aug 2013 13:06:09 +0000 (13:06 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrmap/trunk@1500 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wrmap.js

index c1eab9621372028ff5567e0119f511a62aef0d7a..86d5bcbb2d0c85f3781765713aea5827c6a53e68 100644 (file)
--- 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);
        }