=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js 2014-07-15 19:23:23 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js 2014-07-15 21:30:42 +0000 @@ -738,14 +738,15 @@ }); }; - GIS.core.StyleMap = function(config) { + GIS.core.StyleMap = function(labelConfig) { var defaults = { fillOpacity: 1, strokeColor: '#fff', strokeWidth: 1, pointRadius: 5, labelAlign: 'cr', - labelYOffset: 13 + labelYOffset: 13, + fontFamily: 'arial,sans-serif,roboto,helvetica neue,helvetica,consolas' }, select = { fillOpacity: 0.9, @@ -757,14 +758,12 @@ labelYOffset: 13 }; - defaults.label = '\${label}'; - defaults.fontFamily = 'arial,sans-serif,roboto,helvetica neue,helvetica,consolas'; - - if (config) { - defaults.fontSize = config.labelFontSize; - defaults.fontWeight = config.labelFontWeight; - defaults.fontStyle = config.labelFontStyle; - defaults.fontColor = config.labelFontColor; + if (Ext.isObject(labelConfig) && labelConfig.labels) { + defaults.label = '\${label}'; + defaults.fontSize = labelConfig.labelFontSize; + defaults.fontWeight = labelConfig.labelFontWeight; + defaults.fontStyle = labelConfig.labelFontStyle; + defaults.fontColor = labelConfig.labelFontColor; } return new OpenLayers.StyleMap({