From 527e5780153d4792e6bd680be38576b95f3e0b5f Mon Sep 17 00:00:00 2001 From: philipp Date: Wed, 19 Dec 2012 22:33:43 +0000 Subject: [PATCH] The sledrun icon is now dependent on the sledrun condition. git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrmap/trunk@1253 7aebc617-e5e2-0310-91dc-80fb5f6d2477 --- wrmap.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wrmap.js b/wrmap.js index b02e7f7..d8a0c65 100644 --- a/wrmap.js +++ b/wrmap.js @@ -35,7 +35,7 @@ function init_wrmap(i, jq_map) { var layer_sledruns = new OpenLayers.Layer.Vector("Rodelbahnen", { styleMap: new OpenLayers.StyleMap({ "default": new OpenLayers.Style({ - externalGraphic: "/vorlagen/gmap_rodelbahn_c.png", + externalGraphic: "/vorlagen/bahnzustand${condition}_0.png", graphicWidth: 17, graphicHeight: 17, graphicXOffset: -8, @@ -66,8 +66,9 @@ function init_wrmap(i, jq_map) { layer_sledruns.addFeatures([new OpenLayers.Feature.Vector(point, { label: jq_sledrun.attr('data-title'), url: jq_sledrun.attr('data-url'), - date_report: jq_sledrun.attr('data-date_report'), - condition: jq_sledrun.attr('data-condition') + has_report: jq_sledrun.attr('data-date_report') !== undefined, + date_report: jq_sledrun.attr('data-date_report') === undefined ? null : jq_sledrun.attr('data-date_report'), + condition: jq_sledrun.attr('data-condition') === undefined ? '0' : jq_sledrun.attr('data-condition') })]); }); @@ -93,7 +94,7 @@ function init_wrmap(i, jq_map) { '