← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2776: (GIS) Minor opacity fix + Default thematic layers opacity set to 70%.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 2776 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-01-28 11:22:51 +0100
message:
  (GIS) Minor opacity fix + Default thematic layers opacity set to 70%.
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js	2011-01-27 10:16:44 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js	2011-01-28 10:17:26 +0000
@@ -382,14 +382,11 @@
                 
                 for (var i = 0; i < r.length; i++) {
                     var overlay = G.util.createOverlay(
-                        r[i].data.name,
-                        r[i].data.fillColor,
-                        parseFloat(r[i].data.fillOpacity),
-                        r[i].data.strokeColor,
-                        parseFloat(r[i].data.strokeWidth),
+                        r[i].data.name, r[i].data.fillColor, 1, r[i].data.strokeColor, parseFloat(r[i].data.strokeWidth),
                         G.conf.path_mapping + 'getGeoJsonFromFile.action?name=' + r[i].data.mapSource
                     );
                     
+                    overlay.setOpacity(r[i].data.fillOpacity);
                     overlay.events.register('loadstart', null, loadStart);
                     overlay.events.register('loadend', null, loadEnd);
                     overlay.isOverlay = true;
@@ -1639,13 +1636,15 @@
 							Ext.Ajax.request({
 								url: G.conf.path_mapping + 'addOrUpdateMapLayer' + G.conf.type,
 								method: 'POST',
-								params: {name: mln, type: 'overlay', mapSource: mlmsf, fillColor: mlfc, fillOpacity: mlfo, strokeColor: mlsc, strokeWidth: mlsw},
+								params: {name: mln, type: 'overlay', mapSource: mlmsf, fillColor: mlfc, fillOpacity: 1, strokeColor: mlsc, strokeWidth: mlsw},
 								success: function(r) {
 									Ext.message.msg(true, 'Overlay <span class="x-msg-hl">' + mln + '</span> ' + G.i18n.registered);
 									G.stores.overlay.load();
 									
-									var overlay = G.util.createOverlay(mln, mlfc, mlfo, mlsc, mlsw,
+									var overlay = G.util.createOverlay(mln, mlfc, 1, mlsc, mlsw,
                                         G.conf.path_mapping + 'getGeoJsonFromFile.action?name=' + mlmsf);
+                                        
+                                    overlay.setOpacity(mlfo);
 									
 									if (G.vars.map.getLayersByName(mln).length) {
 										G.vars.map.getLayersByName(mln)[0].destroy();
@@ -1915,6 +1914,8 @@
         })
     });
     
+    polygonLayer.setOpacity(0.7);
+    
     pointLayer = new OpenLayers.Layer.Vector('Point layer', {
         'visibility': false,
         'displayInLayerSwitcher': false,
@@ -1931,6 +1932,8 @@
         })
     });
     
+    pointLayer.setOpacity(0.7);
+    
     G.vars.map.addLayers([polygonLayer, pointLayer]);
         
     var layerTree = new Ext.tree.TreePanel({

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2011-01-26 00:07:38 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2011-01-28 10:17:26 +0000
@@ -887,6 +887,7 @@
 								xtype: 'panel',
 								layout: 'form',
 								bodyStyle: 'padding:8px; background-color:#ffffff',
+                                labelWidth: G.conf.label_width,
 								items: [
 									{html: '<div class="window-info">Select organisation unit level</div>'},
 									{